1. Home
  2. Computing & Technology
  3. Animation

Flash Halloween Bobblehead

By , About.com Guide

8 of 8

The last thing to do is script the user action that will trigger the bobblehead animation - the mouse "tap". For that we'll go back to the main stage, right-click on the head movie clip, select Actions, and use an on (release):

on (release) {
this.gotoAndPlay(2);
}

Now when the user clicks on the doll's head, the bobblehead animation will jump past the stopped first frame to the second frame, play through the entire bouncing animation, then cycle back to the first frame and halt at its rest position when it hits that scripted stop. Check out my example.

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 Bobblehead

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

All rights reserved.