# Simple Timer IF statement

**URL:** <https://forum.kirupa.com/t/simple-timer-if-statement/49094>\
**Category:** flash\
**Created:** [April 19, 2004, 10:22pm UTC](https://forum.kirupa.com/t/simple-timer-if-statement/49094 "2004-04-19T22:22:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isis](https://avatars.discourse-cdn.com/v4/letter/i/85f322/32.png) [@Isis](https://forum.kirupa.com/u/Isis)\
**Post date:** [April 19, 2004, 10:22pm UTC](https://forum.kirupa.com/t/simple-timer-if-statement/49094/1 "2004-04-19T22:22:08Z")

</div>

I’m building a continous move in flash, and i’m displaying some text and images and want to hold the timeline for about 20 seconds and then resume play again. I’m trying to write a simple timer in AS to keep from having to create 10000 frame long movie clips. Here’s what I have so far:

> 

stop();

this.onEnterFrame {  
time = getTimer();  
if (time == 20) {  
play();  
}  
}

Unfortunately, this isn’t working for me, and i’m unsure why. I suspect two things, A: my “time” var takes only a snapshot value of the timer and not a continous value, so the timer never reaches the value of 20. Or, B: I have somesort of syntax wrong and the if never gets a chance to load. This seems like a relitively simple task, and i’m hoping one of you guys can shed some light.

Thanks!  
–Isis.
