This content has been marked as final.
Show 3 replies
-
1. Re: Gravity in as2
kglad Jun 17, 2014 12:58 PM (in response to Elon G)you probably have some scope problems. but rather than correct those, you should remove all code from objects and attach code to timelines:
var fallMax:Number=0;
this.onEnterFrame=gameloopF;
function gameloopF():Void{
if(ball._y<300){
ball._y+=fallMax
if(fallMax<10){
fallMax++;
}
} else {
delete this.onEnterFrame;
}
}
-
-


