User Guide
centerStage 681
centerRegPoint
Usage
-- Lingo syntax
memberObjRef.centerRegPoint
// JavaScript syntax
memberObjRef.centerRegPoint;
Description
Flash, vector shape, and bitmap cast member property; automatically centers the registration
point of the cast member when you resize the sprite (
TRUE, default); or repositions the
registration point at its current point value when you resize the sprite, set the
defaultRect
property, or set the
regPoint property (FALSE).
This property can be tested and set.
Example
This script checks to see if a Flash movie’s centerRegPoint property is set to TRUE. If it is, the
script uses the
regPoint property to reposition the sprite’s registration point to its upper left
corner. By checking the
centerRegPoint property, the script ensures that it does not reposition a
registration point that had been previously set using the
regPoint property.
-- Lingo syntax
property spriteNum
on beginSprite me
if sprite(spriteNum).member.centerRegPoint = TRUE then
sprite(spriteNum).member.regPoint = point(0,0)
end if
end
// JavaScript syntax
function beginSprite() {
var ctrRg = sprite(this.spriteNum).member.centerRegPoint;
if (ctrRg = 1) {
sprite(this.spriteNum).member.regPoint = point(0,0);
}
}
See also
regPoint
centerStage
Usage
-- Lingo syntax
_movie.centerStage
// JavaScript syntax
_movie.centerStage;
Description
Movie property; determines whether the Stage is centered on the monitor when the movie is
loaded (
TRUE, default) or not centered (FALSE). Read/write.