all groups > flash actionscript > february 2005 >
You're in the

flash actionscript

group:

Using a button to skip between frames


Using a button to skip between frames rhyeal
2/28/2005 8:25:53 PM
flash actionscript:
Ok, I have two frames on a looping animation. Short of making a button that
skips to a blank frame at the end of scene 1, how do I make it skip to Scene 2,
Frame 2? Also, I have a button in Scene 2 that needs to skip to Scene 1, Frame
1. Currently, I am doing this by using

on (release) {
gotoAndPlay(27);
}

where frame 27 is a blank frame, and since it loops, it then proceeds to the
first scene again.

According to Flash, i should be able to use

on (release) {
gotoAndPlay("1",2);
}

to jump directly to Scene 1, Frame 2. However, when I publish the .swf, the
button does not work the way it should. Help?
Re: Using a button to skip between frames Nixy
2/28/2005 8:33:47 PM
One thing to know is when the fla is publish, all is put on one scene.
So if you whant to call some frame, I suggest you to use label.
Use label name on you frame and call the label not the frame number.
gotoAndStop("labelNameYouWhant");

hope that can help you
Re: Using a button to skip between frames redl3tt3r
2/28/2005 8:39:20 PM
You must define the scene by the scene name. Do this and it should work fine, providing you did not alter the scene name.


on (release) {
AddThis Social Bookmark Button