Good day everyone here I have a new thread, now is about a sound, I have this code that shows the time from a sound and this is increasing the time from let’s say 0:00, 0:01, 0:02…4:30. Now my question is how can I trick it to do the opossite, meaning that the code to show the time left like 4:30, 4:29, 4:28…0:03, 0:02, 0:01.
onEnterFrame = function () { _global.timer = int(podcast_sound.duration/1000);
_global.position = int(podcast_sound.position/1000);
setTime = {};
setTime.minutes = int((_global.position)/60);
setTime.seconds = int((_global.position)%60);
setTime.total = checkDigits(setTime.minutes)+":"+ checkDigits(setTime.seconds);
// setTime.total = checkDigits((timer)%60);
timeDisplay.text = setTime.total;
} function checkDigits(pWert) {
return (pWert<10) ? pWert="0"+pWert : pWert;
}