# Button problems with Scenes

**URL:** <https://forum.kirupa.com/t/button-problems-with-scenes/13417>\
**Category:** flash\
**Created:** [February 13, 2003, 1:09am UTC](https://forum.kirupa.com/t/button-problems-with-scenes/13417 "2003-02-13T01:09:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deb](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@Deb](https://forum.kirupa.com/u/Deb)\
**Post date:** [February 13, 2003, 1:09am UTC](https://forum.kirupa.com/t/button-problems-with-scenes/13417/1 "2003-02-13T01:09:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 13, 2003, 1:14am UTC](https://forum.kirupa.com/t/button-problems-with-scenes/13417/2 "2003-02-13T01:14:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 13, 2003, 1:23am UTC](https://forum.kirupa.com/t/button-problems-with-scenes/13417/3 "2003-02-13T01:23:20Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 13, 2003, 1:37am UTC](https://forum.kirupa.com/t/button-problems-with-scenes/13417/4 "2003-02-13T01:37:17Z")

</div>

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:

```php
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:

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

```

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 13, 2003, 2:41am UTC](https://forum.kirupa.com/t/button-problems-with-scenes/13417/5 "2003-02-13T02:41:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 13, 2003, 4:50am UTC](https://forum.kirupa.com/t/button-problems-with-scenes/13417/6 "2003-02-13T04:50:46Z")

</div>

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. =)
