# Sound TIME

**URL:** <https://forum.kirupa.com/t/sound-time/294423>\
**Category:** Uncategorized\
**Created:** [August 13, 2009, 7:22pm UTC](https://forum.kirupa.com/t/sound-time/294423 "2009-08-13T19:22:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Offrenbaruna](https://avatars.discourse-cdn.com/v4/letter/o/7cd45c/32.png) [@Offrenbaruna](https://forum.kirupa.com/u/Offrenbaruna)\
**Post date:** [August 13, 2009, 7:22pm UTC](https://forum.kirupa.com/t/sound-time/294423/1 "2009-08-13T19:22:27Z")

</div>

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.

```php

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;
}

```
