Controlling Interaction Between Miaws; Controlling Events Involving Miaws - MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual

Table of Contents

Advertisement

Controlling interaction between MIAWs

Movies can interact with each other by sending Lingo messages back and forth. This lets movies
share current values for variables, share information about current conditions, and send each
other Lingo instructions.
Global variables can be declared in the main movie (the Stage) or in a MIAW. No matter where
they are declared, they are available to the main movie and to all movies that are playing in
windows. For more information about global variables, see "Using global variables" on page 403.
At times, you might want only one movie to respond when the user clicks the mouse or types on
the keyboard. To control when Director can respond to any events that occur outside a window,
set the
window property. When a window's
modal
window, including the Stage, can respond to events such as mouse clicks and keystrokes.
To have a MIAW send a Lingo statement:
Use the
command. See
tell
When using the
tell
directed. When you want a MIAW to send a Lingo message to the main movie, use
refer to the main movie. For example, the statement
instructs the main movie to go to the frame marked Help in the main movie.
To have a MIAW open another MIAW:
In Lingo, only the main movie (the Stage) can open a MIAW. Therefore, to have one MIAW
open another MIAW, you must use the
to open another MIAW.
For example, this statement in a MIAW tells the Stage movie to open the movie menuMovie in its
own window:
tell the stage to open window "menuMovie"
See
in the Lingo Dictionary.
tell

Controlling events involving MIAWs

Lingo provides event handlers for typical events that can occur while a MIAW is playing, such as
the movement of a window by the user. Such a handler is a good place for instructions that you
want to run in response to an event that involves a window.
For example, to cause a sound to play whenever the user closes a MIAW, use the
functions in an
play()
the window. The
handler closes.
See "Movies in a Window" in the "Lingo by Feature" section of the Lingo Dictionary.
542
Chapter 21
in the Lingo Dictionary.
tell
command, be sure to specify the MIAW to which the instructions are
on closeWindow
handler will run whenever the MIAW that contains the
on closeWindow
property is set to
modal
tell the stage to go to "Help"
command in the running MIAW to tell the Stage
tell
handler in a movie script within the movie that plays in
, no other
true
to
the stage
and
queue()

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director mx

Table of Contents