3D Lingo Dictionary > O-S > state

 

state

Syntax

member(whichCastmember).state

Description

3D property; returns the current state of referenced member in the streaming and loading process. This property refers to the initial file import or the last file load requested.

The state property of the member determines what, if any, 3D Lingo can be performed on the cast member.

This property can have any of the following values:

0 indicates that the member is currently not loaded and therefore no 3D media is available. No 3D Lingo should be performed on the member.

1 indicates that the media loading has begun. No 3D Lingo should be performed on the member unless this state is the result of a loadFile operation. If this state is a result of a loadFile operation, then no 3D Lingo should be performed on the contents of the file currently being loaded.

2 indicates that the member's initial load segment is loaded. All objects with a stream priority of zero, as set upon creation of the model file, will be loaded at this time as they are part of the initial load segment. You can perform most 3D Lingo associated with the objects having a load priority of zero. Do not use the loadFile and resetWorld commands during this state.

3 indicates that all the additional media of the member is being loaded and decompressed. Most 3D Lingo can be performed at this point. Do not use the loadFile and resetWorld commands during this state.

4 indicates that all of the member's media has been loaded and all decompression is complete. All 3D Lingo can now be performed on the cast member.

-1 indicates that an undefined error occurred during the media streaming process. Because the error may have occurred at any point during the loading process, the state of the cast member is not reliable.

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