Button problems with Scenes

I have a movie were there are multiple scenes. When I click on a button the first time it goes to the appropriate scene then if I click on that same button it automatically loads the next scene in the list.

I vaguely remember there is a working around for this problem but I can’t seem to find the info.

All my button actions are like:

on (release) {
gotoAndPlay(“league info”, 1); using scene name & frame Number
}

I even tried
on (release) {
gotoAndPlay(“Home”); using a Frame Label
}

Thanks in advance for the help.

Deb

Are you sure all your buttons throughout the scenes are using the same actionscripts?

Yes, right now they are all set to using a scene name & frame number

Thanks

Using frame labels should work, make sure you do have frame labels though as well.

If your buttons are sitting on the main timeline then you can just use this:

on (release) {
	gotoAndPlay("Home");
}

But if your buttons are sitting inside a movieclip then you’ll need to add _root to it so now it would look like this:

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

Those are surely to work cause that’s been tested before many times here.

Just to make sure I am not making a mistake. All my buttons sit on separate layer in Flash all in Frame 1. So I just want to make sure for each layer were a button is located I create a frame label for that button in that layer.

Thanks again for your help.

Ok the reason why you’re in need a frame labels is to have something the buttons can target. Let’s say you have your home button in scene one and you want it to link to scene 2, so in scene 2 you would create a frame label called “home” for example. So now every time the home button is clicked, it would go to that frame label named “home” which is located in scene 2.

Same goes with your other buttons and if your buttons are located in all the scenes then they all must have the same actions. I hope that was a lil bit clearer. =)