Both the
constrainV()
Parameters
Required. An integer that identifies the sprite whose vertical coordinates are
intSpriteNum
evaluated against
Required. An integer to be evaluated against by the vertical coordinates of the left and
intPosn
right sides of the sprite identified by
Example
These statements check the
coordinates of 40 and 60:
-- Lingo syntax
put(constrainV(1, 20)) -- 40
put(constrainV(1, 55)) -- 55
put(constrainV(1, 100)) -- 60
// JavaScript syntax
put(constrainV(1, 20)); // 40
put(constrainV(1, 55)); // 55
put(constrainV(1, 100)); // 60
This statement constrains a moveable slider (sprite 1) to the edges of a gauge (sprite 2) when the
mouse pointer moves past the edge of the gauge:
-- Lingo syntax
sprite(1).locV = _movie.constrainV(2, _mouse.mouseH)
// JavaScript syntax
sprite(1).locV = _movie.constrainV(2, _mouse.mouseH);
See also
constrainH(),
copyPixels()
Usage
-- Lingo syntax
imageObjRef.copyPixels(sourceImgObj, destRectOrQuad, sourceRect {, paramList})
// JavaScript syntax
imageObjRef.copyPixels(sourceImgObj, destRectOrQuad, sourceRect {,
paramList});
Description
Image method. Copies the contents of a rectangle in an existing image object into a new
image object.
When copying pixels from one area of a cast member to another area of the same member, it is
best to copy the pixels first into a duplicate image object before copying them back into the
original member. Copying directly from one area to another in the same image is not
recommended.
To simulate matte ink with
pass that object as the
and
constrainH()
.
intPosn
intSpriteNum
constrainV
Movie
copyPixels()
parameter of
#maskImage
s constrain only one axis each.
.
function for sprite 1 when it has top and bottom
, create a matte object with
copyPixels()
createMatte()
.
copyPixels()
and then
271
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