1. Computing

Animated Flash-Only Thumbnail Gallery II

By

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.

©2014 About.com. All rights reserved.