1. Home
  2. Computing & Technology
  3. Animation

Animated Flash-Only Thumbnail Gallery II

By Adrien-Luc Sanders, About.com

9 of 10

Now go back to the main timeline, and right-click on the first thumbnail (or whichever one is associated with the image you just animated) to open the Actions Panel. Below the code that we added in the last lesson, add the following code:
on (release) {
_root.oneexpand.gotoAndPlay(2);
_root.oneexpand.swapDepths(2);
}

This tells Flash that when the mouse button is clicked and released over that thumbnail, then the instance of the movie clip that we created (mine is named oneexpand) should jump to the second frame and play the animation that shows the full-size image expanding. It will then pause at the next scripted stop to keep the image visible at full-size until we tell it to do otherwise. swapDepths also brings the instance of the movie clip to a higher depth than the rest of the movie, to make sure that it displays on top of everything else.

Explore Animation
About.com Special Features

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

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Animated Flash-Only Thumbnail Gallery II

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

All rights reserved.