EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 904

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...
904 Chapter 14: Properties
Example
This sprite script uses the originMode property to set up a Flash movie sprite so it’s origin point
can be set to a specific point. It then sets the horizontal and vertical origin points.
-- Lingo syntax
property spriteNum
on beginSprite me
sprite(spriteNum).originMode = #point
sprite(spriteNum).originH = 100
sprite(spriteNum).originV = 80
end
// JavaScript syntax
function beginSprite() {
sprite(this.spriteNum).originMode = symbol("point");
sprite(this.spriteNum).originH = 100;
sprite(this.spriteNum).originV = 80;
}
See also
originV, originMode, originPoint, scaleMode
originMode
Usage
-- Lingo syntax
memberOrSpriteObjRef.originMode
// JavaScript syntax
memberOrSpriteObjRef.originMode;
Description
Cast member property and sprite property; sets the origin point around which scaling and
rotation occurs, as follows:
• #center (default)—The origin point is at the center of the Flash movie.
• #topleft—The origin point is at the top left of the Flash movie.
• #point—The origin point is at a point specified by the originPoint, originH, and
originV properties.
This property can be tested and set.
Note: This property must be set to the default value if the scaleMode property is set to #autoSize, or
the sprite will not display correctly.