Groups | Blog | Home
all groups > flash actionscript > november 2004 >

flash actionscript : Actionscript for gotoAndPlay



Sk8tr55
11/8/2004 11:54:40 PM
I am working on a movie that goes through explaining simple machines. There is
a main menu with buttons that lead to different scenes that have explanations
of the simple machines. The scene that the main menu is on is called mainmenu1.
At the end of each scene that explains the machines, there is a button with
actionscript. The button is supposed to go straight back to the main menu, but
it goes back to the very beginning of the movie instead. I have MX 2004. The
script I am using is: on(release){gotoAndPlay('mainmenu1','46');}
Sk8tr55
11/9/2004 12:18:07 AM
homegrownideas
11/9/2004 12:21:24 AM
okay what you would want to do is make the script on the symbol in which you
want to use as a button, make sure it says gotoAndStop, or if you use
gotoAndPlay go to the second scene and use the 'Stop' actionscript
Sk8tr55
11/9/2004 12:26:21 AM
lumeeguvnor
11/9/2004 12:30:40 AM
Sk8tr55
11/9/2004 12:38:42 AM
Peter Blumenthal
11/9/2004 11:04:27 AM

[quoted text, click to view]

In that case why not search the forum for your answer - this comes up about
3 times a day at present, and has been answered many, many times.

Jeckyl
11/9/2004 11:22:30 AM
[quoted text, click to view]

There is your problem .. do not EVER use scene names in gotoAndPlay etc.

Instead put a label on the frame where you menu is (lets call the label
"themenu"), and then use

on (release) {
_root.gotoAndPlay("themenu");
}

Jeckyl
11/9/2004 4:14:54 PM
What doesn't work?

If what I said didn't work then either you did it wrong, or something else
is going wrong in your movie.

[quoted text, click to view]

AddThis Social Bookmark Button