Edwards: 13 Feb 2005
When you play an animation in Flash, unless you used
ActionScript, your animation simply moves through the
timeline - displaying whatever is contained on those frames.
That is very linear, and sometimes you would want to tell
Flash to skip a few frames, or jump to a new frame that is
100 frames down. How can you do that? This tutorial will
In this tutorial you will
learn how to jump from one frame in your animation to
another by using a few lines of ActionScript. The following
is an example of what I will explain:
[ Click the
Go to Frame 2/1 link ]
Steps to Create Animation:
If you follow these steps carefully you shouldn't get too confused.
- Ok let's start by opening up Flash and making a new document. I made mine 250 by 200.
- 2. Go to the time line and name the current layer "buttons".
[ your layer should look something like this
Make a new button by clicking on the create symbol button (below) and make a button of your choice, and ok it.
[ I have drawn a line to the create new symbol button
Now place your button where you want in your movie. Well, it's been easy so far so let's get some coding done. First go to the first frame in your timeline and open the actions panel and enter this code
This just stops the movie from playing, now keep your actions panel open and select your button and paste in this code.
Where it says gotoandplay() you must put the number of the frame you want between the ()
characters. if you want to go to frame six it would be
gotoAndplay(6), it's very important you get this right or it will not work.
5. Well now you just have to put the content in the frame you wish to link to. If you still don't understand download the zip file.