Gravity in as2
Hey I'm new at AS, and i have been trying to make an object (a ball) fall within gravity but nothing happens when i'm running the swf.
here's the code:
onClipEvent (load) {
fallMax = 0;
}
onClipEvent (enterFrame) {
if (ball._y < 300)
{
_y += fallMax;
if (fallMax < 10)
{
fallmax++;
}
}
}
what am i doing wrong?
