What's wrong with this loop?

i want a graphic to flash on and off on a scene, moving the play head back and forth between frames

here’s what i got:

frame1:
//var
counter=1;

frame3:
while (counter<100){
gotoAndPlay(2); //the graphic is in this frame
counter=counter+1;
}

i thought it was working until i increased the value in the condition and realised that the graphic flashes for the sme amount of time (a second or 2) regardless of the value - which must mean it’s not working!

:frowning:
bah

as always, your help is invaluable!

found the answer - an if statement in frame 3 instead, and it works ok

(sorry) <img src=http://www.ezboard.com/intl/aenglish/images/emoticons/embarassed.gif ALT=":o">

try an if statement instead of