### centerRegPoint

Syntax: | `the centerRegPoint of member` `whichFlashMember`
Type: | Cast member property
Description: | This property controls how the registration point of a Flash movie cast member is set. The `centerRegPoint of member` property can have these values:

| `TRUE` Always keep the registration point automatically centered no matter how the sprite is stretched.
| `FALSE` Fix the registration point at its current point value. If you subsequently resize the sprite or set its `defaultRect` property, the registration point remains at the same point value. You can reposition the registration point by setting the `RegPoint` property.

| When a Flash movie cast member is first inserted into the cast, its registration point is set at its center and its `centerRegPoint` property is by default set to `TRUE`. If you subsequently use the `regPoint` property to reposition the registration point, the `centerRegPoint` property is automatically set to `FALSE`.
| The `centerRegPoint of member` property can be tested and set. The default setting is `TRUE`.
Example: | This sprite 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 explicitly set using the `regPoint` property.

    on beginSprite me
    	if the centerRegPoint of member the memberNum of me = TRUE then
    		set the regPoint of member the memberNum of me = point(0,0)
    	end if
    end

Related Lingo: | `regPoint` property

Previous | Next