0
votes

I have a MovieClip which is just a progress bar animation with about 100 frames. Then I load a zip file using a URLStreamLoader and subscribe to the ProgressEvent.PROGRESS event. After loading starts I receive notifications correctly and I set the bar's corresponding frame using gotoAndStop(). Everything seems to work fine except for the animation not being visually updated.

It seems that the scene won't refresh until the zip file is fully loaded. Can anyone help with this?

Thanks in advance :)

1
is this flex or just flash and actionscript?Treby

1 Answers

1
votes

I suspect you might be setting the gotoAndStop frame based on progress of 0-1, instead of 0-100.

If you get the percentage progress like this:
var pcent:Number = loaderInfo.bytesLoaded/loaderInfo.bytesTotal;
You'll get a completion percentage from 0 to 1. Multiply by 100 to get your frame number.