User Guide

Chapter 21538
Creating a MIAW using Lingo
In Lingo, you create a MIAW by specifying a window’s rectangle (rect property) on the Stage
and then specifying the filename for the movie that is assigned to the window. You can also make
the window visible, change its type, set its title, and set the windows size and location.
The easiest way to create a MIAW is to open a window for an existing movie.
To create a new MIAW by opening a window for an existing movie:
Use the following Lingo:
open window("movieName")
This statement creates a window, assigns it the movie movieName, and opens it on the Stage at the
location where movieName was originally authored. You can use the commands that are discussed
in the rest of this chapter to set various attributes of the MIAW.
You can also use a movies filename as the argument for the
open window command. This
approach assigns that movie to a window and instructs Director to use the filename as the
window title.
To create a MIAW using a filename and the Open Window command:
Use the following Lingo:
on beginNewMovie theMovie
global newWindow
set newWindow to window theMovie
set newWindow.titleVisible to FALSE
open newWindow
end beginNewMovie
This version of the handler allows the window newWindow to use the default setting for its rect
property. The default is to use the rect property of the movie that is being opened in the window.
You can also assign a MIAW to a variable, which makes it easier to write the handler and reuse it.
To assign a MIAW to a variable:
Use the following Lingo:
on beginNewMovie theMovie
global newWindow
set newWindow to window "The Big Picture"
set newWindow.rect to rect(0, 0, 250, 200)
set newWindow.filename to theMovie
set newWindow.titleVisible to FALSE
open newWindow
end beginNewMovie
The variable newWindow contains a new window named The Big Picture. The handler sets the
rect property of the window to a rect object, and then assigns a movie file to the window. The
handler makes the title bar at the top of the window invisible, and opens the window.
Opening and closing a MIAW
Use the commands in this section to open and close movies in windows. For more information,
see the Lingo Dictionary.