
ADOBE DIRECTOR 11.0
User Guide
396
window().new("movieName").open()
// JavaScript syntax
new window("movieName");
window("movieName").open();
-or-
new window("movieName").open();
Unless you explicitly preload the movie through scripting, Director doesn’t load the movie into memory until the
window is opened, which can cause a noticeable pause. To load the first frame of the movie, use the
preLoadMovie
method.
To specify other window characteristics before or after you open the window and by using the Display Template at
authoring time, see
Window appearance properties
.
Closing a MIAW
You can close the window for a MIAW but leave the movie in memory, or you can close the MIAW and remove the
movie from memory when it’s no longer in use.
•
If you leave a MIAW in memory, you get better performance if the window is reopened; however, the movie still
consumes memory. Use this option if you expect a MIAW to be reopened after it initially runs or if other windows
or global variables refer to the MIAW.
•
If you remove a MIAW from memory, performance slows down if the window is reopened; however, it doesn’t
consume memory until the movie is reloaded. Use this option if you don’t expect a MIAW to be reopened after it
initially runs or if you want to optimize memory on the computer running the MIAW.
Close a MIAW but keep it in memory
•
Use the
close()
method. For example,
window("window name").close()
. After the window is closed, the
window becomes invisible, but the movie continues playing. (You can also still access it in the
windowList
.)
Close a MIAW and remove it from memory
•
Use the
forget()
method. For example,
window(
"
window name
"
).forget()
. Use this method only if no
other window or global variables still refer to the MIAW. When you remove a MIAW from memory, it is no longer
available in the windowList. For more information about this method, see the Scripting Reference topics in the
Director Help Panel.
Setting the window size and location for a MIAW
Setting the screen coordinates for a MIAW lets you control the size of the window and where it appears. Setting the
coordinates before the movie appears controls the initial position of the window; setting them after the window
appears moves the window.
About rect, drawRect, and stageRect
The
rect
,
drawRect
, and
sourceRect
properties are available off of the stage or the window as follows:
_movie.stage.rect
_movie.stage.drawRect
_movie.stage.sourceRect
Содержание 65036570 - Director - PC
Страница 1: ...i ADOBE DIRECTOR 11 USER GUIDE...