Behaviors > Attaching a behavior to a timeline

 

Attaching a behavior to a timeline

To trigger a behavior at a certain frame in a timeline (rather than having a visitor's interaction trigger it), place the behavior in the timeline. (For information on creating a timeline, see Animating your layers.) For example, you can start a sound playing at frame 15 of a timeline.

Only one kind of event can trigger an action in a timeline: the animation reaching a certain frame number (an onFrame7 event, for example).

The behavior can affect any object on the page, not just objects in the timeline. Preview the timeline in a browser to see the behavior working. You cannot preview behaviors inside Dreamweaver.

To place a behavior in a timeline:

1 Click in a frame in the Behaviors channel in the Timelines panel.
2 Use the Behaviors panel to choose an action to perform at that frame.
The action appears in the Behaviors panel, with an event indicating the frame number at which the action is triggered. A minus sign (-) appears in the Behaviors channel of the timeline frame.