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.
Содержание 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...