Chapter 21
538
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 window’s 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 movie’s 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.
Содержание 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 ...