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.
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...