940
Chapter 14: Properties
See also
Member
quad
Usage
-- Lingo syntax
spriteObjRef
.quad
// JavaScript syntax
spriteObjRef
.quad;
Description
Sprite property; contains a list of four points, which are floating point values that describe the
corner points of a sprite on the Stage. Read/write.
The points of the quad are organized in the following order: upper left, upper right, lower right,
and lower left.
The points themselves can be manipulated to create perspective and other image distortions.
After you manipulate the quad of a sprite, you can reset it to the Score values by turning off the
scripted sprite with
puppetSprite(
intSpriteNum
,
FALSE)
. When the quad of a sprite is
disabled, you cannot rotate or skew the sprite.
Example
This statement displays a typical list describing a sprite:
-- Lingo syntax
put(sprite(1).quad)
// JavaScript syntax
put(sprite(1).quad);
When modifying the
quad
sprite property, you must reset the list of points after changing any of
the values. This is because when you set a variable to the value of a property, you are placing a
copy of the list, not the list itself, in the variable. To effect a change, use syntax like this (applies to
Lingo only):
-- Lingo syntax
currQuadList = sprite(5).quad
currQuadList[1] = currQuadList[1] + point(50, 50)
sprite(5).quad = currQuadList
See also
point()
,
puppetSprite()
,
Sprite
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...