Using Director > Playing Movies over the Internet > Checking whether media elements are loaded with Lingo |
![]() ![]() ![]() |
Checking whether media elements are loaded with Lingo
Director has several options that let an initial portion of a movie start playing as soon as the required data and cast members are available. You can use Lingo to check whether media elements have been downloaded from a network by testing the following:
![]() |
Whether a specific cast member is loaded before the movie proceeds |
![]() |
Whether the cast members used in a specific frame are loaded before the frame plays |
Checking whether a cast member or sprite is loaded
To determine whether a specified cast member is available locally, you use the mediaReady
cast member or sprite property. You can check for a specific cast member or the cast member assigned to a specific sprite. When mediaReady
returns TRUE
, the cast member is available. See mediaReady
.
This property always returns TRUE
for local files. It is useful only for movies that stream from a remote server. Since playback can begin before the entire movie has been downloaded, you must make sure that the needed media elements have been downloaded as the movie plays.
Checking whether a frame's contents are loaded
Use the frameReady()
function to determine whether all the media elements that the specified frame requires are available locally. See frameReady()
.
![]() ![]() ![]() |