UrbaNomad
May 12th, 2003, 05:54 PM
I am trying to make a beating heart using actionscript. I'm trying to use the onClipEvent method used in kirupa's Movement Using ActionScript tutorial. I was able to make a continuously growing heart by simply using MovieClip._xscale and MovieClip._yscale, but to make it beat seems a bit more difficult.
I tried to put a variable in the onClipEvent that I could counter, so that I could mod it and do an if/else based on the outcome but uh... then I realized it reinitializes the variable every time lol.
Is there a way I could make the variable somewhere other than inside the onClipEvent? I think that is the simplest, but I am open to other suggestions on how to do this. It is sort of like the basis for a lot of the animation you could do in flash as I see it.
Thanks,
UrbaNomad
I tried to put a variable in the onClipEvent that I could counter, so that I could mod it and do an if/else based on the outcome but uh... then I realized it reinitializes the variable every time lol.
Is there a way I could make the variable somewhere other than inside the onClipEvent? I think that is the simplest, but I am open to other suggestions on how to do this. It is sort of like the basis for a lot of the animation you could do in flash as I see it.
Thanks,
UrbaNomad