
410
Chapter 18: Movies in a Window
About MIAWs
A MIAW is the combination of a window object and a movie object. In fact, there is no such
thing as a MIAW object, but it is the name used to describe the concept of this unique
combination of window and movie objects. Most of the properties described in this section are
really window properties, but apply to a MIAW. MIAWs and windows are not identical, and it is
important to keep that in mind.
Creating or declaring a MIAW
You must first explicitly create or declare the MIAW before you can use it or set its properties.
To explicitly declare a new MIAW in Lingo:
•
Use the following script:
window().new ("window name")
To explicitly declare a new MIAW in JavaScript syntax:
•
Use the following script:
new window("window name");
These statements create a window with the name and title "window name" and assign it the
movie "window name" to play in that window.
Note:
When you declare a MIAW, it automatically is added to the player’s window list.
Assigning a MIAW a filename and title
Although the simple MIAW declaration line works well when the movie and the window title and
name are all the same, you can also explicitly set the filename and title of the MIAW after creating
the MIAW.
You can use a movie’s filename as the argument for the
open window
method. This approach
assigns that movie to a window and instructs Director to use the filename as the window title.
To assign a filename and title to a MIAW:
•
Use the following script to associate the movie
"my_Movie"
with the window:
window("window name").filename = "my_Movie"
•
Use the following script to assign the window's title to be
"window title"
.
window("window name").title = "window title"
The default behavior of a MIAW is to size itself using the
rect
property of the movie that is being
opened in the window.
Opening and closing a MIAW
Use the methods in this section to open and close movies in windows. For more information, see
the Scripting Reference topics in the Director Help Panel.
Opening a MIAW
Before you can play a movie in a separate window, you must first open the window explicitly. The
window must have already been declared.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...