Strange way of animating a movieclip
I have analized all the code of a project, in one of it's classes there's a propertie(variable) that increments within a function, it is actually an animation step, and the only ways to play a movieclip's next frame is using gotoAndPlay, gotoAndStop, prevFrame and nextFrame, but in the class it is just this..
public function hurt(_damage:Number):void
{
//trace("hurt", health, _damage)
health-=_damage
if(health <= 0)
{
kill=true
health=0
}
animationStep=5 - health
trace(animationStep);
}
So what makes flash know that animationStep is a way of animating a movieclip if it's only an interger variable declared inside the class body? I mean you would put this.. gotoAndPlay(2); for example, and not "animationStep=5 - health. As far as I know the compiler doesn't know that animationStep is a propertie of the movieclip class. It is just an interger variable. And as I said I analized all the code and there's nothing that proves that the compiler will know that "animationStep" is a propertie of the movieclip class, thanks in advance.
Any help would be very appreciated.
