User Guide
Using Flash and Other Interactive Media Types 301
• To stop a Flash movie at its current frame but let any audio continue to play, use the
hold command.
• To specify a separate timeline within a Flash cast member as the target of subsequent Lingo
sprite commands, use the
tellTarget() and endTellTarget() commands.
• To call a series of actions that reside in a frame of a Flash movie sprite, use the callFrame()
command.
Controlling Flash movie interactivity with Lingo
Lingo can control whether a Flash movie remains interactive. For more information, see the
Lingo Dictionary.
• To control whether the actions in a Flash movie are active, set the actionsEnabled property
to TRUE.
• To control whether buttons in a Flash movie are active, set the buttonsEnabled property.
• To control when a Flash movie detects mouse clicks or rollovers, set the clickMode property.
• To control whether clicking a button in a Flash movie sends events to sprite scripts, set the
eventPassMode property.
• To determine which part of a Flash movie is directly over a specific point on the Stage, use the
hitTest function.
• To check whether the mouse pointer is over a button in a Flash movie, test the
mouseOverButton property.
Using Lingo to set and test Flash variables
Two sprite functions exist to support access to ActionScript variables in Flash sprites:
getVariable() and setVariable(). For more information, see the Lingo Dictionary.
• To return a string that contains the current value of a Flash sprite variable, use the following
statement:
spriteReference.getVariable( "variableName", TRUE)
The parameter TRUE is the default, and is therefore optional.
• To return a reference to the value of a Flash variable instead of the variable’s literal value, add a
value of
FALSE to the end of the command. This lets you get or set the value of the variable
simply by using the reference.
myVariableReference = spriteReference.getVariable( "variableName", FALSE)
Once you have created the reference to the variable, you can test it with the following
statement:
put myVariableReference
-- value
• To set the current value of a Flash sprite variable to a specified string, use the following
statement:
spriteReference.setVariable( "variableName", "newValue" )
Note: Be sure to pass the Flash variable’s name and value as strings in both the getVariable() and
setVariable()
functions. Failure to do so will result in script errors when the functions are executed.