EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR - Setting the window size and location for a MIAW

MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR
500 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
412 Chapter 18: Movies in a Window
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
There are three rect values of concern: rect, drawRect and sourceRect. All three properties are
available off of the stage or the window:
_movie.stage.rect
_movie.stage.drawRect
_movie.stage.sourceRect
window("stage").rect
window("stage").drawRect
window("stage").sourceRect
sourceRect
: This is a property of the movie's stage, it indicates the "template" rect position at
which the stage should appear; therefore, when a window is opened that is to display a particular
movie, that movie's sourceRect is used to determine the window's initial position on the user's
monitor.
Note: The window's sourceRect property is inherited from the movie that it contains
rect
: This is a property of the window playing a particular movie and it indicates the current rect
coordinates of the window on the user's monitor; this property gets its initial value (when the
window is created) from the window's/movie's sourceRect property
Note: The movie's stage.rect property is inherited from the window that it is playing in.
drawRect - this is a window property that indicates the rect area within the window into which
the playing movie is to be drawn; this property is initially set to rect(0,0,w,h) where w and h are
the width and height of the window (by default we fill the window with the movie)
Note: The movie's stage.drawRect property is inherited.
To specify the screen coordinates for a MIAW:
Set the rect property to the coordinates of the location where you want the window to appear.
Define the coordinates as a rectangle in this order: left, top, right, and bottom, as shown in the
following statement:
window("Sample").rect = rect(0, 0, 200, 300)
For your convenience, assign the coordinates to a variable and use the variable in your script
statements.
For more information, see the Scripting Reference topics in the Director Help Panel.

Table of Contents

Related product manuals