com.yahoo.astra.utils.DynamicRegistration
Keywords: DynamicRegistration,com.yahoo.astra.utils.DynamicRegistration,move,rotate,scale

YUI AS Component Documentation | All Packages | All Classes | Index | Frames No Frames |
Class DynamicRegistration

Package | com.yahoo.astra.utils
Class | public class DynamicRegistration

Allows you to manipulate display objects based on a registration point other than the standard (0,0).

Public Methods

| Method | Defined by
--- | --- | ---
|  | move(target:DisplayObject, registration:Point, x:Number = 0, y:Number = 0):void [static] Moves a `DisplayObject` to a new position (x,y) based on a registration point. | DynamicRegistration
|  | rotate(target:DisplayObject, registration:Point, degrees:Number = 0):void [static] Rotates a `DisplayObject` based on a registration point. | DynamicRegistration
|  | scale(target:DisplayObject, registration:Point, scaleX:Number = 0, scaleY:Number = 0):void [static] Scales a `DisplayObject` based on a registration point. | DynamicRegistration

Method detail

move | () | method

`public static function move(target:DisplayObject, registration:Point, x:Number = 0, y:Number = 0):void`

Moves a `DisplayObject` to a new position (x,y) based on a registration point. The true position of the object will be (x - registration.x, y - registration.y).

Parameters

| `target:DisplayObject` — the DisplayObject to move
| `registration:Point` — the registration point of the DisplayObject
| `x:Number` (default = `0`)`` — the new x position, in pixels
| `y:Number` (default = `0`)`` — the new y position, in pixels

rotate | () | method |

`public static function rotate(target:DisplayObject, registration:Point, degrees:Number = 0):void`

Rotates a `DisplayObject` based on a registration point.

Parameters

| `target:DisplayObject` — the DisplayObject to move
| `registration:Point` — the registration point of the DisplayObject
| `degrees:Number` (default = `0`)`` — the new rotation angle

scale | () | method |

`public static function scale(target:DisplayObject, registration:Point, scaleX:Number = 0, scaleY:Number = 0):void`

Scales a `DisplayObject` based on a registration point.

Parameters

| `target:DisplayObject` — the DisplayObject to move
| `registration:Point` — the registration point of the DisplayObject
| `scaleX:Number` (default = `0`)`` — the new x scaling factor
| `scaleY:Number` (default = `0`)`` — the new y scaling factor