# Random countdown timer

**URL:** <https://forum.kirupa.com/t/random-countdown-timer/246665>\
**Category:** flash\
**Created:** [December 13, 2007, 8:25am UTC](https://forum.kirupa.com/t/random-countdown-timer/246665 "2007-12-13T08:25:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackieMoon](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@JackieMoon](https://forum.kirupa.com/u/JackieMoon)\
**Post date:** [December 13, 2007, 8:25am UTC](https://forum.kirupa.com/t/random-countdown-timer/246665/1 "2007-12-13T08:25:37Z")

</div>

Is there a way, well I am sure there is, to have a a timer countdown from say 999999 randomly by say a number between 800 and 999, or whatever. Also, once the place gets to zero, have it display a zero. I am guessing I would use a ‘length’ variable. Something like:

if (length(counterdowner) == 5 {  
counterdowner = “0”+counterdowner;  
}  
if (length(counterdowner) == 4 {  
counterdowner = “0”+“0”+counterdowner;  
}  
etc.

Can I just do a “00” instead of “0”+“0”. I may be way off here anyway.

Let me tell you what I have done, I created my own font in the shape of the Predator wrist band thing. You know the one where he counts down with until the explosion. I sort of want to do this kind of thing. It’s corny I know, but I was sort of playing around.

I am sort of new to Actionscript so be gentle. However, any help you can give me would be appreciated. Thanks a ton.
