Hello
I am using ‘gotoandplay’ scene by scene link using this code. If I use this in the same time line (internal), it’s working properly but when I use this code in as a class, I got this error
Call to a possibly undefined method MovieClip.
I use this code in time timeline
b_enter.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_enter1);
function fl_ClickToGoToScene_enter1(event:MouseEvent):void
{
MovieClip(this.root).gotoAndPlay("p menu", "Menu");
}
I use this code in class
package {
import flash.display.SimpleButton;
public class next extends SimpleButton {
public function next() {
// constructor code
MovieClip(this.root).gotoAndStop("p2", "page2")
}
}
}
u can download the flash file using this link