1

I'm trying to go to another scene by clicking a button witch is placed in a mc and I got an error. This is my code below

Play_btn.addEventListener(MouseEvent.CLICK,gotoScene2); 
function gotoScene2(evt:MouseEvent){
    movClip.gotoAndPlay(1,"Scene 2");
}

(this code is placed inside a movieClip witch is instantiated like "movClip", at frame 260 - may be this help to understand better). And this is the erorr i get: Symbol 'preloader26',Layer'Layer9',Frame 260,Line 4 1120:Access of undefined property movClip I hope anyone can help me...thanks very much!

tziuka
  • 545
  • 1
  • 6
  • 23

1 Answers1

2

Try to get the parent of the object , like this:

MovieClip(this.parent).gotoAndPlay(1,"Scene 2");
Ivan Chernykh
  • 41,617
  • 13
  • 134
  • 146