Hey guys, just trying things out trying to get practice with this thing. Right now I'm trying to get a simple animation to loop over and over after one button press. I decided to try to achieve this I'm trying to use a while loop. But so far I'm having no luck. Once the button is pressed it just plays the movie once. Heres the code I know i'm doing something wrong. I just don't know what, It's most likely something with the scope of the loop. I Just wouldn't know where else to put the loop.
function clickThis(eventType:MouseEvent):void
{
var p:Number =0;
while (p < 10)
{
gotoAndPlay(1);
p++;
}
}
play1.addEventListener(MouseEvent.CLICK,clickThis);
Thanks guys,
-Soapy