Content on this page requires a newer version of Adobe Flash Player.
"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;
trace("i is" + i)
//////////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;
trace(i);
if (i==5){
gotoAndStop(3);
}
if (i>=7){
gotoAndPlay("youWin");
}
}
HOME WORK-
1) this week: March 9 & 11
Start by drawing a mode diagram for this "Thing".
2) next week: (Week #8)
Enjoy your Spring Break
3) (Week #9)
Have some code finished, with some variables
Due : Wed. March 25th