User Guide

254
Examples
This statement determines whether the cast members for frame 20 are downloaded and ready to
be viewed:
on exitFrame
if frameReady(20) then
-- go to frame 20 if all the required
--castmembers are locally available
go to frame 20
else
-- resume animating loop while background
--is streaming
got to frame 1
end if
end
The following frame script checks to see if frame 25 of a Flash movie sprite in channel 5 can be
rendered. If it cant, the script keeps the playhead looping in the current frame of the Director
movie. When frame 25 can be rendered, the script starts the movie and lets the playhead proceed
to the next frame of the Director movie.
on exitFrame
if the frameReady(sprite 5, 25) = FALSE then
go to the frame
else
play sprite 5
end if
end
See also
mediaReady
frameScript
Syntax
the frameScript
Description
Frame property; contains the unique cast member number of the frame script assigned to the
current frame.
The
frameScript property can be tested. During a Score recording session, you can also assign a
frame script to the current frame by setting the
frameScript property.
Examples
The following statement displays the number of the script assigned to the current frame. In this
case, the script number is 25.
put the frameScript
-- 25
This statement makes the script cast member Button responses the frame script for the current frame:
the frameScript = member "Button responses"