Using Lingo Or Javascript Syntax To Set And Test Flash Variables - MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

Controlling Flash content interactivity with Lingo or JavaScript syntax
Lingo or JavaScript syntax can control whether Flash content remains interactive. For more
information, see the Scripting Reference topics in the Director Help Panel.
To control whether the actions in Flash content are active, set the
to
.
TRUE
To control whether buttons in Flash content are active, set the
To control when Flash content detects mouse clicks or rollovers, set the
To control whether clicking a button in Flash content sends events to sprite scripts, set the
eventPassMode
To determine which part of Flash content is directly over a specific point on the Stage, use the
method.
hitTest
To check whether the mouse pointer is over a button in Flash content, test the
mouseOverButton

Using Lingo or JavaScript syntax to set and test Flash variables

In previous Director releases it was necessary to use the
methods to access Flash variables. Director MX 2004 now allows you to access Flash variables and
execute methods directly on the Director sprite.
To set a Flash variable:
Use the following syntax:
spriteReference.myFlashVariable = "newValue"
For example, the following expression sets the Flash variable called myColorSwatch to red on
the sprite called myFlashSprite:
sprite("myFlashSprite").myColorSwatch = "red"
To get the value of a Flash variable:
Use the following syntax:
put spriteReference.myFlashVariable
For example, the following expression gets the value of the Flash variable called
myColorSwatch on the sprite called myFlashSprite:
put sprite("myFlashSprite").myColorSwatch
To execute a Flash method:
Use the following syntax:
spriteReference.myFlashMethod()
For example, the following expression calls the method setColorSwatch on the sprite called
myFlashSprite:
sprite("myFlashSprite").setColorSwatch("blue")
For more information, see
property.
property.
"Using Flash objects in script" on page
Using Lingo or JavaScript syntax to set and test Flash variables
actionsEnabled
buttonsEnabled
clickMode
and
getVariable()
setVariable()
193.
property
property.
property.
189

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents