User Guide
974 Chapter 14: Properties
script
Usage
-- Lingo syntax
_movie.script[scriptNameOrNum]
// JavaScript syntax
_movie.script[scriptNameOrNum];
Description
Movie property; provides indexed or named access to the script cast members of a movie.
Read-only.
The
scriptNameOrNum argument can be either a string that specifies the name of the script cast
member or an integer that specifies the number of the script cast member.
• If scriptNameOrNum is a string, the script property provides access to the script cast member,
regardless of which cast library contains that member.
• If scriptNameOrNum is an integer, the script property provides access only to the script cast
member found within the first cast library of the referenced movie; you cannot use indexed
access to specify a cast library other than the first one.
Example
The following statement accesses a named script.
-- Lingo syntax
bugScript = _movie.script["Warrior Ant"]
// JavaScript syntax
var bugScript = _movie.script["Warrior Ant"];
See also
Movie
scripted
Usage
-- Lingo syntax
spriteChannelObjRef.scripted
// JavaScript syntax
spriteChannelObjRef.scripted;
Description
Sprite Channel property; specifies whether a sprite channel is under script control (TRUE) or
under Score control (
FALSE). Read-only.
Example
These statements create a scripted sprite from cast member kite in sprite channel 5 if that channel
is not already under script control.
-- Lingo syntax
if (channel(5).scripted = FALSE) then
channel(5).makeScriptedSprite(member("kite"))
end if