Using Flash and Other Interactive Media Types
303
•
To specify an event message, specify the word
event
followed by a colon, the name of a
handler you will write in Director, and a parameter (if any) to pass along with the event.
For example, in Flash, you can specify this in the Network URL field:
event: FlashMouseUp “Dali”
In Director, you write this handler:
on FlashMouseUp me whichFrame
go to frame whichFrame
end
When the Director script receives the
FlashMouseUp
message and the
whichFrame
parameter,
the movie jumps to the frame specified by
whichFrame
, which is the frame “Dali”.
•
To specify a Lingo statement, specify the word
lingo
, followed by a colon, followed by the
Lingo statement that you want Director to execute.
For example, in Flash, you can specify this in the Network URL field:
lingo: go to frame “Dali”
When Director receives the
getURL
message from the Flash movie, the movie immediately
executes the Lingo statement. In this case, the movie jumps to the frame containing the
marker “Dali”.
•
To send XML data from a Flash sprite or a global Flash object to Lingo, use the
XMLobject
.send
ActionScript method. It includes the parameters
URL
and
targetWindow
.
Then include an
on sendXML
handler in your Lingo. This handler takes the same parameters,
as follows:
on sendXML me, URL, targetWindow, xmlData
The
xmlData
parameter is the XML data contained in the original
XMLObject
. You can then
add Lingo to the handler to process the XML data. A common action is to send the XML data
to the URL and await the response of the server located at the URL, as in this example:
on sendXML me, URL, targetWindow, xmlData
gotoNetPage URL, targetWindow
postNetText(URL, xmlData)
end
You can place handlers to capture events from Flash movies in a Flash sprite or cast member script
or in a frame or movie script. The event follows the normal Director message hierarchy.
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...