This content has been marked as final. Show 4 replies
OK, debugged my progress bar, with the slight problem that although I no longer get an error message when the script is checked, neither does anything happen.
The following is in frame 1 of the Flash project. "mcMain" refers to content displayed in a scrollpane.
Again, no errors are generated, but I don't see any progress bar either. Thanks!
var pctLoaded:Number = Math.round(mcMain._currentframe/mcMain._totalframes)*100;
bar_mc._xscale = pctLoaded;
bar_mc._visible = true;
OK, found one issue: the bar is not updating. The code works,but as the movie progresses, the progress bar does not update.
How to I prompt that?
You may need to put your update code onto a movieclip so it is updating every frame. If you have the code as is on the main timeline, it will run once, then not execute again.
Select your bar_mc clip and use the following code:
_visible = true;
var pctLoaded:Number = Math.round((_parent.mcMain._currentframe/_parent.mcMain._totalframes)*100);
_xscale = pctLoaded;
*note that this assumes mcMain and bar_mc are both on the same level of the timeline (not nested within different clips)... otherwise change the _parent. to the path of the mcMain clip (_root.clip1.clip2.mcMain).
Hope that helps!
You nailed it!!!
Dropped the code on the bar_mc movie clip and it ran perfectly.
A !!!!!!!!!!!!! MILLION !!!!!!!!!!!!!!!! thank yous!!!!!!!!!!!