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.
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...