1. Home
  2. Computing & Technology
  3. Animation

Flash Halloween Costume Dress-Up Doll II: Controls & Scripting pt. 2

By , About.com Guide

7 of 7

Just like on the forward-scrolling button, we’re going to use an on (press) and on (release) for the triggers to stop and start the rewind:

on (press) {
_root.rewind.gotoAndPlay(2) ;
}

on (release) {
_root.menu.stop ( ) ;
_root.rewind.gotoAndStop(1) ;
}

The on (press) tells Flash that when the mouse button is held down over the menu playback button, then the rewind controller clip (named rewind on my stage) should jump ahead from its hold on frame 1 of its timeline to start the loop that runs through frames 2 and 3.

The on (release) stops both the menu movie clip in its current position, but also tells the rewind controller clip to jump back to its static hold on frame 1 of its timeline and stay there. If you didn’t do both, then the menu wouldn’t stop when you released the mouse button, because the loop wouldn’t be broken until it reached the beginning.

That should just about cover it. Not so difficult, really; we learned a few new things, tried some new tricks with some old lessons, and overall the hardest part was the repetition of applying some of the scripts repeatedly.

You can view (or spend precious minutes of your life playing with) the full-size working costume doll here.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Halloween Costume Dress-Up Doll II: Controls & Scripting

©2009 About.com, a part of The New York Times Company.

All rights reserved.