Hi, I'm working with 2 scenes. Upon clicking a button, I want the user to be taken to the next scene which I have labelled next. I have tried nextScene(), gotoAndStop(), and they're not working. An error comes up, "the scene was not found". Below is the code for the class, could anyone please tell me why there is an error and how I can rectify it? Would appreciate it very much, thank you!
ActionScript Code: package { import flash.display.MovieClip; import flash.events.MouseEvent; import flash.geom.Point; public class submitButton extends MovieClip { protected var originalPosition:Point; var piz:pizza=new pizza(); //var myRoot:MovieClip=this; public var clicked:Boolean=false; //constructor public function submitButton() { buttonMode=true; //event listener on mouse click stage.addEventListener(MouseEvent.CLICK, ingClick); //stage.removeEventListener(MouseEvent.CLICK, ingClick); } //trace("working till here?:/"); function ingClick (e:MouseEvent):void { //myRoot.gotoAndPlay("next"); //MovieClip(root).gotoAndPlay(1,"next"); //gotoAndStop("1","next"); nextScene();//calls the next scene piz.total(); //trace("total function from pizza class has been executed"); buttonMode=false; clicked=true; //stage.removeEventListener(MouseEvent.CLICK, ingClick); } }}
Error: Scene was not found
Friday, May 11, 2012
[Action Script] Error: Scene was not found May,2012
Posted by Bimo Hery Prabowo at 11:13 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment