..::DMS 121B::..
..::Basic Digital Art::..
==================

 :: home || syllabus || calendar || projects || lessons & labs ::

 

Lab 18: Controlling Playback with Buttons
(note: Working in teams on this lab may prove incredibly helpful.)

Use buttons and basic Actionscript to control the playback of a movie.

Set up your movie with "actions" and "labels" layers.

Create keyframes in your "labels" layer in order to add section labels. Call the sections: start, one, two.

Next, add keyframes to the "actions" layer in the frames just before the keyframes on the "labels" layer.

Add a STOP action to each of the keyframes on the "actions" layer in order to hold the playhead in each section.

Create a "text" layer in your main movie. In the first keyframe (in the "start" section), add the text: "This is the start of my movie."

Add a keyframe in section "one" and modify the text in that keyframe to read: "Welcome to section one."

Add another keyframe in section "two" and modify the text in that keyframe to read: "Welcome to section two."

Now, create two button symbols. Call them "button1" and "button2". You don't need to get too fancy on this, but remember to specify a HIT area so they're easy to click on.

Add the buttons on a new layer in your main movie.

Select "button1" and bring up your Actionscript window. It should say "Action-Button" in the top bar. Add an action script to the button that will move the playhead to section "one" when it is clicked.

Do the same thing for "button2", except point the action script to section "two".

Test your movie to make sure it works. Then call me over to approve your work.

 

Shawn Rider || Department of Media Study || University at Buffalo

This website is a resource for a college course and is not intended for public use.
Last updated: Tuesday August 26, 2003