# If statement not working

**URL:** <https://forum.kirupa.com/t/if-statement-not-working/149407>\
**Category:** flash\
**Created:** [May 28, 2005, 9:16pm UTC](https://forum.kirupa.com/t/if-statement-not-working/149407 "2005-05-28T21:16:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikiekwoods](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mikiekwoods](https://forum.kirupa.com/u/mikiekwoods)\
**Post date:** [May 28, 2005, 9:16pm UTC](https://forum.kirupa.com/t/if-statement-not-working/149407/1 "2005-05-28T21:16:54Z")

</div>

[left]I’m new to actionscript…

For some reason my if statement is not working. It is in a movie clip of a blinking eye and I want the code to pause the blink for 4 seconds between blinks.

The movie clip does not have an instance name (which may be the problem).

Frames 1-12 is the eye blink animation. (no script)

Frame 13

```auto
 timeDelay = 4+getTimer()/1000; 

```

Frame 14 is empty

Frame 15 is

```auto

var timeYet = getTimer()/1000;
if (timeYet >= timeDelay) {
 gotoAndPlay(1);
 }
gotoAndPlay(14);

```

When I run the movie, the varaibles change like they should according to the time, but for some reason, it skips over the if statement even is timeYet is greater than timeDelay. I probably labeled the variables wrong, but I do how they should be.[/left]
