[F8] music loader progress?
Hello there.
I'm trying to build a progress bar the shows how much of an external mp3 has loaded.
the bar instance is an mc named "mpBar" , which is nested in a mc named "mcmpb".
I tried to set the inital _x property to 0, and then have it increment based on getbytsloaded/getbytstotal; but it's not showing working (it starts out in the 100% position).
My code is as follows
var nLoadProgressInterval:Number;
_root.mcmpb.mpBar.setProperty("_root.mcmpb.mpBar", _xscale,0);
function checkLoadProgress():Void {
mBytes = _root.sndAudio.getBytesLoaded()/_root.sndAudio.getBytesTotal();
setProperty("_root.mcmpb.mpBar", _xscale, mBytes);
}
and on the button I have a call to the function like this
_root.track3.onRelease = function():Void {
nLoadProgressInterval = setInterval(checkLoadProgress, 100);
}
Any help here?