MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 499

Director scripting reference
Table of Contents

Advertisement

var myRectWidth1 = myRect.right - myRect.left; // 50
var myRectWidth2 = myRect[3] - myRect[1]; // 50
To see an example of
Lingo folder inside the Director application folder.
Parameters
Required. An integer that specifies the number of pixels that the left side of the rectangle
intLeft
is from the left edge of the Stage.
Required. An integer that specifies the number of pixels that the top side of the rectangle
intTop
is from the top edge of the Stage.
Required. An integer that specifies the number of pixels that the right side of the
intRight
rectangle is from the left edge of the Stage.
Required. An integer that specifies the number of pixels that the bottom side of the
intBottom
rectangle is from the top edge of the Stage.
Example
This statement sets the variable
right side is at 300, and bottom is at 400 pixels:
-- Lingo syntax
newArea = rect(100, 150, 300, 400)
// JavaScript syntax
var newArea = rect(100, 150, 300, 400);
In Lingo only, the following statement sets the variable
points
firstPoint
-- Lingo syntax
firstPoint = point(100, 150)
secondPoint = point(300, 400)
newArea = rect(firstPoint, secondPoint)
In Lingo only, these statements add and subtract values for rectangles:
-- Lingo syntax
put(rect(0, 0, 100, 100) + rect(30, 55, 120, 95)) -- rect(30, 55, 220, 195)
put(rect(0, 0, 100, 100) -rect(30, 55, 120, 95)) -- rect(-30, -55, -20, 5)
In Lingo only, this statement adds 80 to each coordinate in a rectangle:
-- Lingo syntax
put(rect(60, 40, 120, 200) + 80) -- rect(140, 120, 200, 280)
In Lingo only, this statement divides each coordinate in a rectangle by 3:
-- Lingo syntax
put(rect(60, 40, 120, 200) / 3) -- rect(20, 13, 40, 66)
See also
point(),
quad
used in a completed movie, see the Imaging movie in the Learning/
rect()
to a rectangle whose left side is at 100, top is at 150,
newArea
and
:
secondPoint
to the rectangle defined by the
newArea
rect()
499

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents