User Guide
629
state (Flash, SWA)
Syntax
member(whichCastMember).state
state of member whichCastMember
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 member’s media is currently loading.
• 4—The cast member’s media has finished loading.
• -1—An error occurred.
This property can be tested but not set.
Example
This statement issues an alert if an error is detected for the SWA streaming cast member:
on mouseDown
if member("Ella Fitzgerald").state = 9 then
alert "Sorry, can’t find an audio file to stream."
end if
end