Using Lingo To Set And Test Flash Variables - MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual

Table of Contents

Advertisement

To stop a Flash movie at its current frame but let any audio continue to play, use the
command.
hold
To specify a separate timeline within a Flash cast member as the target of subsequent Lingo
sprite commands, use the
To call a series of actions that reside in a frame of a Flash movie sprite, use the
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
to
.
TRUE
To control whether buttons in a Flash movie are active, set the
To control when a Flash movie detects mouse clicks or rollovers, set the
To control whether clicking a button in a Flash movie sends events to sprite scripts, set the
eventPassMode
To determine which part of a Flash movie is directly over a specific point on the Stage, use the
function.
hitTest
To check whether the mouse pointer is over a button in a Flash movie, test the
mouseOverButton

Using Lingo to set and test Flash variables

Two sprite functions exist to support access to ActionScript variables in Flash sprites:
and
getVariable()
To return a string that contains the current value of a Flash sprite variable, use the following
statement:
spriteReference.getVariable( "variableName", TRUE)
The parameter
To return a reference to the value of a Flash variable instead of the variable's literal value, add a
value of
FALSE
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
setVariable()
tellTarget()
property.
property.
(). For more information, see the Lingo Dictionary.
setVariable
is the default, and is therefore optional.
TRUE
to the end of the command. This lets you get or set the value of the variable
functions. Failure to do so will result in script errors when the functions are executed.
and
endTellTarget()
buttonsEnabled
Using Flash and Other Interactive Media Types 301
commands.
callFrame()
property
actionsEnabled
property.
property.
clickMode
getVariable()
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director mx

Table of Contents