EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 277

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 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...
cross 277
See also
image (Image), image(), rect (Image)
crop() (Bitmap)
Usage
-- Lingo syntax
memberObjRef.crop()
// JavaScript syntax
memberObjRef.crop();
Description
Bitmap command; allows a bitmap cast member to be cropped to a specific size.
You can use
crop to trim existing cast members, or in conjunction with the picture of the Stage to
grab a snapshot and then crop it to size for display.
The registration point is kept in the same location so the bitmap does not move in relation to the
original position.
Parameters
rectToCropTo
Required. Specifes the rectangle to which a cast member is cropped.
Example
This statement sets an existing bitmap member to a snapshot of the Stage, then crops the
resulting image to a rectangle equal to sprite 10:
-- Lingo syntax
stageImage = (_movie.stage).image
spriteImage = stageImage.crop(sprite(10).rect)
member("sprite snapshot").image = spriteImage
// JavaScript syntax
var stageImage = (_movie.stage).image;
var spriteImage = stageImage.crop(sprite(10).rect);
member("sprite snapshot").image = spriteImage;
See also
picture (Member)
cross
Usage
vector1.cross(vector2)
Description
3D vector method; returns a vector which is perpendicular to both vector1 and vector2.
Example
In this example, pos1 is a vector on the x axis and pos2 is a vector on the y axis. The value
returned by
pos1.cross(pos2) is vector( 0.0000, 0.0000, 1.00000e4 ), which is
perpendicular to both pos1 and pos2.

Related product manuals