At 8/27/11 12:53 AM, Momo-the-Monkey wrote:
gotoAndStop(percent);
Next time, try the Flash Forum
Note:
Sorry about that, misread it...
Anyway, the code you posted was the same as this one tutorial video's code that I used. I have no idea what's wrong with it but basically it stops at the first frame, and is stuck there until it is done loading. After it loads it goes straight from frame 1 to the play button.
Here is my code:
This code is on the main timeline, not inside the movieclip
stop();
onLoad = function() {
total = _root.getBytesTotal()
loaded = 0
}
loading_bar.onEnterFrame = function() {
loaded = _root.getBytesLoaded()
loading_bar.gotoAndStop(percent);
percent = loaded/total*100
}
The movieclip which contains the animation is the instance of loading_bar.