Controlling Timelines

Dreamweaver provides behaviors to start, stop, and loop timelines. Each timeline can be started and stopped independently, and they can each have different frame rates (set using the Fps field in the Timelines panel).

Starting a Timeline

You can start a timeline automatically using autoplay or trigger it with another event, such as a button click.

Playing a timeline with autoplay

To start a timeline when the document loads, enable the Autoplay checkbox (see Figure 17-1) in the Timelines panel (if using multiple timelines, the autoplay mode can be set separately for each timeline). When you set a timeline to autoplay, Dreamweaver automatically attaches the Play Timeline action to the document’s <body> tag and triggers it with the onLoad event.

Starting and stopping a timeline with an event

To play a timeline, apply the Timeline Play Timeline behavior using the Add Behavior (+) pop-up menu in the Behaviors panel. This behavior is typically applied to an image acting as a “Play” button and triggered by the onMouseDown event. Applying it opens the Play Timeline dialog box (not shown) from which you can choose the timeline to play. Apply one instance of the behavior for each timeline you wish to play. You can even apply this behavior in the Behaviors channel of one timeline to start another timeline.

By default, a timeline plays once and then stops. To stop a timeline prematurely, apply the Timeline Stop Timeline behavior using the Add Behavior (+) pop-up menu in ...

Get Dreamweaver in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.