Hi guys,
I’m having some problems trying to calculate the size of a progress bar.
Here is the thing I have a movie with X scenes and I want the progress bar to fill up according to the porcentage of my timeline that has passed.
here is the code I’m using
var parcialSeek
var completeSeek
this.addEventListener(Event.ENTER_FRAME, tamanhoBarra)
function tamanhoBarra(e:Event):void{
completeSeek = vid_mc.totalFrames // vid_mc is the movie clip that loads my external SWF
parcialSeek = vid_mc.currentFrame / vid_mc.totalFrames
seek_mc.seekBar_mc.scaleX = parcialSeek
}
with this code every new scene the bar starts again and since I don’t have exacts 100 frames on my movie the bar size dosen’t match?
can anyone please help? thanks a lot for the atention!!