# If a certain button is pressed go to and play

**URL:** https://forum.kirupa.com/t/if-a-certain-button-is-pressed-go-to-and-play/245767
**Category:** Uncategorized
**Created:** [December 3, 2007, 8:47pm UTC](https://forum.kirupa.com/t/if-a-certain-button-is-pressed-go-to-and-play/245767 "2007-12-03T20:47:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cr8igster](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@cr8igster](https://forum.kirupa.com/u/cr8igster)
#### Post date: [December 3, 2007, 8:47pm UTC](https://forum.kirupa.com/t/if-a-certain-button-is-pressed-go-to-and-play/245767/1 "2007-12-03T20:47:40Z")

</div>

I have three scenes in my flash website.

Home, Who and Shows.  
From the homepage:

When i click the shows button it goes and play’s frame 100-120 on the time line using:

shows\_btn.onRelease = function(){  
gotoAndPlay(100);

Then at frame 120 i have some more actionscript saying

if (shows\_but.onRelease == true){  
goToAndPlay (“Shows”,1);  
}

There doesn’t seem to be any errors in the actionscript but when i test by clicking on Shows from home, it goes to frame 100-120 (plays a door transition). then instead of going to shows it goes to who.

I think it has something to do with the order of the scenes in the scene panel. Top down the order is currently Home, Who, Shows.

How do i resole my problem? Thanks in advance 🙂
