[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
timeDelay = 4+getTimer()/1000;
Frame 14 is empty
Frame 15 is
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]