# Having a problem with gotoAndPlay "Scene"

**URL:** <https://forum.kirupa.com/t/having-a-problem-with-gotoandplay-scene/320824>\
**Category:** flash\
**Created:** [April 2, 2011, 3:59pm UTC](https://forum.kirupa.com/t/having-a-problem-with-gotoandplay-scene/320824 "2011-04-02T15:59:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisW182](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@ChrisW182](https://forum.kirupa.com/u/ChrisW182)\
**Post date:** [April 2, 2011, 3:59pm UTC](https://forum.kirupa.com/t/having-a-problem-with-gotoandplay-scene/320824/1 "2011-04-02T15:59:15Z")

</div>

Hey on my .swf, i have two scenes, one acts as a preloader and is called “preloader” and the other scene, which is called (“Scene1”) contains all the rest of my stuff.

on the preloader scene i have inserted the following code:

stop();

this.addEventListener(Event.ENTER\_FRAME, loading);

function loading(e:Event):void  
{

var total:Number = this.stage.loaderInfo.bytesTotal;  
var loaded:Number = this.stage.loaderInfo.bytesLoaded;  
bar\_mc.scaleX = loaded/total;  
loader\_txt.text = Math.floor((loaded/total)\*100)+ “%”;  
if (total == loaded)  
{  
gotoAndStop(Scene1,“home”);  
this.removeEventListener(Event.ENTER\_FRAME, loading);  
}

}

But i am getting the following errors.

‘access of undefined property Scene1’

When i put the Scene1 in quotations i get

‘cannot find scene1 label on the timeline’

can anyone help at all?

i have never had a question answered on this forum and i am hoping this time i can 🙂

Thanks  
ChrisW
