Sending Messages From Flash Content Using Geturl - MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual

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

Advertisement

You can also use the following two sprite methods to access ActionScript variables in Flash sprites:
getVariable()
the Director Help Panel.
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
and
setVariable()
executed.

Sending messages from Flash content using getURL

A Flash sprite can send messages to Director in the form of a string by using the Flash
ActionScript
getUrl()
engine of Director at the movie level (for example, a movie script), or at the sprite level received
only by the behavior located on the Flash sprite sending the message. The message can also be a
simple string such as "Hello Director" received by an
In Flash, you create a button or frame and then assign it a
the message you want the Flash sprite to send to Director.
The section covers the following topics:
"Sending simple messages and script statements"
"Sending script statements with arguments" on page 192
Sending simple messages and script statements
You can send simple strings or script statements from Flash content to a Director movie. To pass
more complicated strings, see
To get Flash content to generate a message for Director:
In Flash, add the
1
As the URL parameter of the
2
Flash to send to the movie.
190
Chapter 9: Using Flash, Flash Components, and Other Interactive Media Types
and
(). For more information, see the Scripting Reference topics in
setVariable
is the default, and is therefore optional.
TRUE
to the end of the method. This lets you get or set the value of the variable
methods. Failure to do so results in script errors when the methods are
method. The string can be an event message sent either to the scripting
"Sending script statements with arguments" on page
function to your ActionScript code.
getURL
getURL
on getURL
getURL()
on this page.
function, enter the Director script statement you want
getVariable()
handler in a movie script.
action in which you specify
192.

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