Chapter 11
302
In previous versions of Director, there were only three possible return values for this function:
#background
,
#normal,
and
#button
. In Director 8.5 and later, there is a fourth return value
possible:
#editText
. This value indicates that an editable text field within the Flash sprite is
over the specified location. See
getVariable()
,
setVariable()
, and
hitTest()
in the
Lingo Dicitonary.
Sending Lingo instructions from Flash movies
A Flash movie can send Lingo instructions to a Director movie. (Flash 2 movies do not support
this feature.) The Lingo can determine how the movie responds when the user clicks a button or
the Flash movie enters a frame. In Flash, you can send a string to Lingo with a Flash
on getURL
handler. The string can be an event message, a complete Lingo statement or a simple string such
as
"Hello Tom"
.
In Flash, you create a button or frame and then assign it a Get URL action in which you specify
the Lingo that the Flash cast member sends.
To set up a Flash movie to generate an event:
1
In Flash, select a button.
2
Select Window > Actions.
3
In the Actions pane, click the Actions tab and select Browser/Network > getURL.
4
Double-click the getURL action to add it to the button instance.
5
In the URL field, enter the Lingo that you want Flash to send to the movie.
6
In the Window field, enter the name of the window you want the result to be displayed in.
•
To specify a string to pass to an
on getURL
handler in the Director movie, enter the string. In
Director, include an
on getURL
handler that receives the string from the Flash movie and reads
the string as a parameter.
For example, in Flash, you can specify this in the Network URL field:
Dali
In Director, you can write this handler:
on getURL me stringFromFlash
go to frame stringFromFlash
end
When the
on getURL
handler receives the text string (“Dali”), it reads the string and then
jumps to the frame labeled Dali in the Director Score.
Содержание 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...