Syntax: |
the loop of sprite whichFlashSprite |
|
the loop of member whichFlashMember
|
Type: |
Cast member property; sprite property |
Description: |
This property controls whether a Flash movie sprite plays in a continuous loop or plays once and then stops. The loop property can have these values: |
|
 |
TRUE When the last frame plays, start again at the first frame.
|
 |
FALSE Stop when the last frame plays.
|
|
|
The loop property can be tested and set.
|
Example: |
This frame script checks the download status of a Flash movie in channel 5 using the percentStreamed property. When the movie finishes downloading, the script sets the loop property of the Flash movie in channel 6 to FALSE so that it will continue playing through to the end and then stop. It then starts the movie in channel 6. In this script, note that the repeat loops use the updateStage command to let the animation and streaming continue. |
|
on enterFrame
play sprite 6
repeat while the percentStreamed of sprite 5 < 100 then
updatestage
end repeat
set the loop of sprite 6 = FALSE
repeat while the playing of sprite 6 = TRUE
updatestage
end repeat
play sprite 5
end
|
 |
|