Using Director > Movies in a Window > Cropping and scaling a MIAW

 

Cropping and scaling a MIAW

You can use Lingo to crop or scale a MIAW.

To crop a MIAW:

Set the rect window property to an area smaller than the MIAW. See rect (window).

To scale a MIAW:

Set the drawRect property to coordinates smaller than the MIAW's original size and apply the position to the window, as shown in the following example:

set aRect = rect(0, 0, 200, 300) 
set window("Sample").drawRect = aRect -- sets window size to 200 x 300
set window("Sample").drawRect = aRect/2 -- scales the window to half its original size

When the drawRect property specifies a window rectangle that is smaller than the movie, the window appears in the upper left corner, and the movie is compressed to fit within the window. See drawRect.