View Full Version : Progress Bar
jamesapeterson
04-18-2007, 09:00 PM
I have seen a lot of tutorials and free downloads of preloader bars, but can anyone tell me what I do if I want to show the progress of a currently running swf? For instance, if the swf is %50 done playing the bar will have moved %50 of the way across the screen. Help.
James
evride
04-18-2007, 10:58 PM
code for actionscript on the main timeline (create a new layer and name it actions; lock it; click on the frame and paste this code on the actions menu thingy)
//create a movieclip with just a bar with an instance name of progressBar for this to work
var currentFrame:Number = _root._currentframe;
var totalFrames:Number = _root._totalframes;
var percentDone:Number = currentFrame/totalFrames;
progressBar._width = 550*percentDone;
example (http://www.erictek.com/flashfiles/timeline.swf)
fla (http://www.erictek.com/flashfiles/timeline.fla")
this is to be put on every single frame.
someone else can complicate it more for me
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.