Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

want to play a movie a certain # of times

Status
Not open for further replies.

guitarlover

Technical User
Dec 21, 2004
10
US
I am developing a logo in which small squares "pixels", flicker seemingly randomly. I want them to do this for a few seconds and then stop. According to Flash help, I can do this with a do/while expression:

i = 0
do {
gotoAndPlay("flicker");
i = i + 1
} while (i<=50);

Unfortunately, it doesn't work. It just flickers away without counting.

What am I doing wrong?

Thank, Steve
 
try

i=0

this.onEnterFrame = function(){
if(i<50){
gotoAndPlay("flicker");
i++
}else{
delete this.onEnterFrame
}
}
 
Dear Bill Watson,

Thanks for the info. What happens is that it does what I just realized my actioncode was doing. It doesn't count up the "flickers", it regulates how fast it plays the next "flicker". In effect, it merely slows the flickering down.

I'm going to have to look elsewhere in the .fla file.

Thanks anyway,

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top