# Not working in MX2004

**URL:** <https://forum.kirupa.com/t/not-working-in-mx2004/166122>\
**Category:** flash\
**Created:** [October 17, 2005, 8:10am UTC](https://forum.kirupa.com/t/not-working-in-mx2004/166122 "2005-10-17T08:10:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jerry](https://forum.kirupa.com/u/jerry)\
**Post date:** [October 17, 2005, 8:10am UTC](https://forum.kirupa.com/t/not-working-in-mx2004/166122/1 "2005-10-17T08:10:58Z")

</div>

Hey there… 🙂

I’ve got a little ‘timer function’, witch basicly just counts the seconds, and can be restarted and paused - this works fine in MX, but when trying to use the code in MX2004, it just won’t work… :h:

Here my code:

```auto
function restartTimer()
{
    seconds = "0";
    buttonPressTime = getTimer() / 1000 - pauseLength;
    pause();
} // End of the function
function pause()
{
    pauseTime = getTimer() / 1000;
    timing = false;
} // End of the function
function unpause()
{
    unpauseTime = getTimer() / 1000;
    pauseLength = unpauseTime - pauseTime + pauseLength;
    timing = true;
} // End of the function

_root.onEnterFrame = function ()
{
    totalTime = getTimer() / 1000 - pauseLength;
    goTime = totalTime - buttonPressTime;
    if (timing)
    {
        seconds = Math.floor(goTime);
        if (seconds < 10)
        {
            _root.seconds = seconds;
        } // end if
    } // end if
};

```

Any help would be nice…
