Controlling Playback

Suppose you’ve created an automated slide show (see page 398). The page loads, and every few seconds a new slide appears. But what if you wanted to let the viewer control the slide show—pausing it, for example, when a particularly interesting image appears, and then restarting it when ready? Or what if you wanted to give your audience the option to rewind back to the beginning or jump to a particular slide?

Special Dreamweaver Behaviors give you this kind of playback flexibility.

Note

If you haven’t created at least one timeline, these behaviors are grayed out in the Behaviors panel.

Starting and Stopping Timelines

As mentioned earlier in this chapter, the Autoplay box in the Timelines panel makes a timeline play automatically when the page loads. You might, however, want to start a timeline based on some other action, such as when your viewer clicks a Play button.

Tip

When using behaviors to control a layer, don’t apply the behavior to the layer. In fact, if you select a layer, these behaviors are grayed out in the Behaviors panel. Behaviors are attached to items that cause something to change—for example, a link, that when clicked, starts an animation on the page—and not the thing you wish to change (in this case, a layer).

To give your visitors this push-button control, use the Play Timeline behavior, which you might attach to a Play-button graphic. (For best effect, add a dead link to an image on the page [as described on page 329] and then attach the behavior ...

Get Dreamweaver MX: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.