PDA

View Full Version : Buttons Help!


anon191
01-08-2008, 02:44 PM
Im very close to completing a game ive been designing, however one thing stands in my way. I have a button on my last scene (the file is broken down to three scenes) and i need it to return the user to the very beginning of the game (the main menu) with all variables reset).

Im currently using the code on the button:

on (release) {
gotoAndPlay("scene 1");
}

but its not doing anything at all! :confused:
Is there a way i can simply return the user to beginning?

Thanks for any help!!

joeshultheis
01-08-2008, 06:53 PM
you could create a function that resets all the variables and put it in the actions on frame one of scene one. I do not use "scene" so I probably can not help with the scene issue - but could it be a _parent.gotoAndPlay("scene"); the parent thing caused me problems for a while. I am still a newbie, but moving forward. Good luck.

Joe Shultheis

anon191
01-08-2008, 11:28 PM
Ah given that a try, but still no luck...thankyou for the suggestion though.
Any other ideas guys?

ASWC
01-08-2008, 11:35 PM
gotoAndPlay("scene 1", 1);

atomic
01-08-2008, 11:40 PM
on (release) {
_level0.gotoAndPlay(1);
}

anon191
01-09-2008, 04:59 PM
on (release) {
_level0.gotoAndPlay(1);
}

It worked!
Thankyou so much! :)

atomic
01-09-2008, 05:00 PM
Grrrrrrrrrreat! ;)