# Problem going to the correct frame w/ 2 scenes

**URL:** <https://forum.kirupa.com/t/problem-going-to-the-correct-frame-w-2-scenes/223515>\
**Category:** flash\
**Created:** [April 23, 2007, 2:49pm UTC](https://forum.kirupa.com/t/problem-going-to-the-correct-frame-w-2-scenes/223515 "2007-04-23T14:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisM](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@ChrisM](https://forum.kirupa.com/u/ChrisM)\
**Post date:** [April 23, 2007, 2:49pm UTC](https://forum.kirupa.com/t/problem-going-to-the-correct-frame-w-2-scenes/223515/1 "2007-04-23T14:49:17Z")

</div>

I have two scenes, ‘Preloader’ and ‘Scene 1’  
The preloader works fine. It is when I want to go to a frame using gotoAndPlay that the problem exists. The preloader is only 2 frames long.  
The frame I want to goto is frame 40 in ‘Scene 1’  
All the buttons will do this, but for this examples use he “Resume” button on the swf files.

if I use \_root.gotoAndPlay(40) it will go to 2 frames prior to the one I want. I.e. Frame 38 in Scene 1 [http://www.blackonyx.net/ex/3.swf](http://www.blackonyx.net/ex/3.swf)

if I use \_root.gotoAndPlay(“Scene 1”, 40) It does nothing as in this: [http://www.blackonyx.net/ex/1.swf](http://www.blackonyx.net/ex/1.swf)

if I use \_root.gotoAndPlay(“Scene 1”, 42) it does nothing as well.  
if I use gotoAndPlay(40) it does nothing  
if I use gotoAndPlay(42) it does nothing

if I give the frame a label and use that label such as \_root.gotoAndPlay(“Resume”) it will have the same behavior as \_root.gotoAndPlay(40), however on the second click it will go to the correct frame. As in here: [http://www.blackonyx.net/ex/2.swf](http://www.blackonyx.net/ex/2.swf) Click “resume” once and it will go to the contact info, click it again it will go to the correct frame. Click it a third time and it will go back to the incorrect frame.

if I use \_root.gotoAndPlay(42) it works and goes to frame 40, but if that button is clicked a second time it will go to 2 frames after the frame I want. Here [http://www.blackonyx.net/](http://www.blackonyx.net/) Click Resume once it goes where I want. Click it again and it goes two frames ahead and starts to play, which isn’t what I want it to do.

Any ideas?

If you want to take at the fla file it is here: [http://www.blackonyx.net/ex/Site.fla](http://www.blackonyx.net/ex/Site.fla) (save as)
