"Try it once, and not much happens. Try it again, and fail. Keep trying, and keep failing. Start over, and eventually you will succeed. Then you do it again." |
//the code on frame 1: stop(); var i:int; i=0; //////////code for the button///// BTN1.addEventListener(MouseEvent.CLICK,test); function test(evt:Object):void{ if (i==0){gotoAndStop(2); } else{ gotoAndStop(10); } i=i+1; if (i==5){ gotoAndStop(3); } if (i>=7){ gotoAndPlay("youWin"); } } |
Mouse.hide(); var sml:Smile = new Smile(); stage.addEventListener(Event.ENTER_FRAME, handlerThing); function handlerThing(event:Event):void { //–––––––––––––––––––––––––––––––––––– //to get your mouse to come back you should add "removeChild(sml);" and "Mouse.show();" //For example, you can add it to a button: button.addEventListener(MouseEvent.CLICK, clickHandler); function clickHandler(evt:Object):void { |
|