Adobe 65036570 - Director - PC User Manual page 213

User guide
Hide thumbs Also See for 65036570 - Director - PC:
Table of Contents

Advertisement

In Flash, you create a button or frame and then assign it a
want the Flash sprite to send to Director.
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
Sending script statements with
Have Flash content to generate a message for Director
1
In Flash, add the
getURL
As the URL parameter of the
2
movie.
Handle a message string passed by Flash content
Specify the message string in the Flash content.
1
For example, in Flash, you could specify the following string as the URL parameter of the
Hello World
In Flash, the ActionScript would look like this:
getURL("Hello World");
In Director, include an
2
For example, in Director, you could enter the following handler in a movie script:
on getURL me, stringFromFlash
_movie.go("stringFromFlash")
end
When the
on getURL
frame labeled Hello World in the Director Score.
Set up a script statement for execution at the Movie level
In Flash, specify an event message by specifying the word lingo followed by a colon, the name of a handler you
1
write in Director, and a parameter (if any) to pass with the event.
For example, in Flash, you could specify the following statement as the URL parameter of the getURL function:
lingo: myDirectorScript
In Flash, the ActionScript would look as follows:
getURL("lingo:myDirectorScript");
Note: Using lingo with getURL fully supports sending Lingo, not JavaScript, syntax. However, you can send JavaS-
cript syntax method calls to Director because the syntax for calling a method is the same syntax as for calling Lingo
handlers.
2
In Director, include an event handler to execute the statement passed by the Flash content.
For example, in Director, you could write a corresponding handler as follows:
on myDirectorScript
_movie.go("Flash Message Received")
end
arguments.
function to your ActionScript code.
function, enter the Director script statement you want Flash to send to the
getURL
handler to receive and read the string passed by the Flash content.
on getURL
handler receives the text string ("Hello World"), it reads the string and then jumps to the
action in which you specify the message you
getURL()
ADOBE DIRECTOR 11.0
User Guide
function:
getURL
202

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents