Animation

  1. Home
  2. Computing & Technology
  3. Animation

Animated Flash Dropdown Menu

By Adrien-Luc Sanders, About.com

9 of 9

That was quite a bit to go through in one breath, but it’s nothing you haven’t done before, so hopefully it was pretty easy to follow along with. Now there’s one last thing to do; we need to add ActionScripting to the Movie Clip symbol on the main stage so that it rolls out when the mouse moves over it.

Because we set a stop at both the beginning and end of the movie clip’s timeline, we’ll need to tell Flash that when the mouse moves over the movie clip, it needs to jump past frame 1 (where the stop is) and move on to frame 2 to play freely until the end, where the stop will catch it and hold it. When the mouse moves away from the movie clip, it needs to rewind back to the beginning (making the menu vanish) and stop.

For this we’ll use the on function (on (rollOver) and on (rollOut)) and the goto function (gotoAndPlay, gotoandStop):

on (rollOver) {
this.gotoAndPlay (2) ;
}
on (rollOut) {
this.gotoAndStop (1) ;
}

Remember, this. reminds Flash to apply these functions to the selected Movie Clip.

Play around with the menu animation yourself.

9 of 9

Index: Animated Flash Dropdown Menu

  1. Part 1
  2. Part 2
  3. Part 3
  4. Part 4
  5. Part 5
  6. Part 6
  7. Part 7
  8. Part 8
  9. Part 9

Explore Animation

More from About.com

Animation

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Animated Flash Dropdown Menu

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

All rights reserved.