clearInterval(my_interval);
};
my_sound.loadSound("song2.mp3", true);
var my_interval:Number;
my_interval = setInterval(checkProgress, 100, my_sound);
function checkProgress(the_sound:Sound):Void {
var pct:Number = Math.round(the_sound.getBytesLoaded()/
the_sound.getBytesTotal()*100);
var pos:Number = Math.round(the_sound.position/the_sound.duration*100);
status_txt.text = the_sound.getBytesLoaded()+" of
"+the_sound.getBytesTotal()+" bytes ("+pct+"%)"+newline;
status_txt.text += the_sound.position+" of "+the_sound.duration+"
milliseconds ("+pos+"%)"+newline;
}
See also
Sound.getBytesTotal()
Sound.getBytesTotal()
Availability
Flash Player 6.
Usage
my_sound.getBytesTotal() : Number
Parameters
None.
Returns
An integer indicating the total size, in bytes, of the specified Sound object.
Description
Method; returns the size, in bytes, of the specified Sound object.
Example
See
Sound.getBytesLoaded()
See also
Sound.getBytesLoaded()
Sound.getPan()
Availability
Flash Player 5.
Usage
my_sound.getPan() : Number
for a sample usage of this method.
Sound.getPan()
685
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?