User Guide

state (Flash, SWA) 1011
Example
This statement shows that the cast member named PartyScene has finished loading and preparing
for playback, and no errors occurred during the load:
put member("PartyScene").state
-- 4
state (Flash, SWA)
Usage
-- Lingo syntax
memberObjRef.state
// JavaScript syntax
memberObjRef.state;
Description
Cast member property; for Shockwave Audio (SWA) streaming cast members and Flash movie
cast members, determines the current state of the streaming file. The properties
streamName,
URL, and preLoadTime can be changed only when the SWA sound is stopped.
The following properties for the SWA file return meaningful information only after the file
begins streaming:
cuePointNames, cuePointTimes, currentTime, duration, percentPlayed,
percentStreamed, bitRate, sampleRate, and numChannels.
For SWA streaming cast members, the following values are possible:
0—Cast streaming has stopped.
1—The cast member is reloading.
2—Preloading ended successfully.
3—The cast member is playing.
4—The cast member is paused.
5—The cast member has finished streaming.
9—An error occurred.
10—There is insufficient CPU space.
For Flash movie cast members, this property returns a valid value only when the Director movie is
running. The following values are possible:
0—The cast member is not in memory.
1—The header is currently loading.
2—The header has finished loading.
3—The cast members media is currently loading.
4—The cast members media has finished loading.
-1—An error occurred.
This property can be tested but not set.