# Simple Timer Modification

**URL:** https://forum.kirupa.com/t/simple-timer-modification/236669
**Category:** flash
**Created:** [August 22, 2007, 6:19pm UTC](https://forum.kirupa.com/t/simple-timer-modification/236669 "2007-08-22T18:19:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thegaffer](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@thegaffer](https://forum.kirupa.com/u/thegaffer)
#### Post date: [August 22, 2007, 6:19pm UTC](https://forum.kirupa.com/t/simple-timer-modification/236669/1 "2007-08-22T18:19:20Z")

</div>

I came across this timer from [http://www.triquitips.com/flash\_simple\_timer.html](http://www.triquitips.com/flash_simple_timer.html) and was wondering if anyone can assist in a little modification? I’ve emailed the publisher, but yet to receive a response yet.

Rather than the timer start from 00:00, I need it to start from 45:00 (45 being minutes).

```auto
startTime = getTimer();

onEnterFrame = function () {
   elapsedTime = getTimer() - startTime;
   elapsedHours = Math.floor(elapsedTime / 3600000);
   remaining = elapsedTime - elapsedHours * 3600000;
   elapsedM = Math.floor(remaining / 60000);
   remaining = remaining - elapsedM * 60000;
   elapsedS = Math.floor(remaining / 1000);
   remaining = remaining - elapsedS * 1000;
   elapsedH = Math.floor(remaining / 10);
   if (elapsedHours < 10) {
      hours = "0" + elapsedHours.toString();
   }
   else {
      hours = elapsedHours.toString();
   } // end if
   if (elapsedM < 10) {
      minutes = "0" + elapsedM.toString();
   }
   else {
      minutes = elapsedM.toString();
   } // end if
   if (elapsedS < 10) {
      seconds = "0" + elapsedS.toString();
   }
   else {
      seconds = elapsedS.toString();
   } // end if
   if (elapsedH < 10) {
      hundredths = "0" + elapsedH.toString();
   }
   else {
      hundredths = elapsedH.toString();
   } // end if
 _root.timer_txt = hours + ":" + minutes + ":" + seconds + ":" + hundredths;

```

[COLOR=#0000bb]  
};[/COLOR]Any help would be much appreciated.
