Hi all,

Thanks for your help. It still loops infinitely.

The following code works but it will not loop when it is replayed:

If(index = 1)
stop
Else
Set Variable:"index" = "1"
End If

So the following statement is added before the if...else statement:

Set Variable:"index" = "0"

But this cause the infinite loop again.

I think the reason is because....
when the index is first set to 0, it will enter the else loop, so index will become 1 and come out of the loop. Then it will start from the begining of the coding again. And the index is set to 0 again and went into the else loop again.

This will cause it to loop infinitely.

So I tried to search Flash Help whether it has while loop. I think it doesn't, only have Loop While(). So I tried the following:

Set Variable:"index" = "0"
Loop While(index < 2)
If(index = 1)
stop
Else
Set Variable:"index" = "1"
End If
End Loop

However, this doesn't help too. Anyway, my assignment is done. Just want to know why it cannot loop twice when it is replayed.

Thanks a lot. If you have a better way to loop a movie, do let me know.