how do I calculate a time read out from a streaming mp3 file?
if I just want a text field to display the current mins/secs? 2:30
this is what i have… but it doesnt work…
var time_interval:Number = setInterval(checkTime, 500);
function checkTime(the_sound:Sound) {
var ms_seconds:Number = the_Sound.time;
var minutes:Number = Math.floor(ms_seconds/60000);
var seconds = Math.floor(ms_seconds%60);
if (seconds<10) {
seconds = "0"+seconds;
}
timeLabel.text = minutes+":"+seconds;
}