Method | Defined by | ||
---|---|---|---|
AlignUtil Static Constructor
| AlignUtil | ||
alignCenter(item:DisplayObject, target:DisplayObject):void
[static]
Center align object to target.
| AlignUtil | ||
alignLeft(item:DisplayObject, target:DisplayObject):void
[static]
Left align object to target.
| AlignUtil | ||
alignRight(item:DisplayObject, target:DisplayObject):void
[static]
Right align object to target.
| AlignUtil | ||
flip(obj:Object, axis:String = "y"):void
[static]
Flip object on an axis.
| AlignUtil | ||
scale(item:DisplayObject, scale:Number):void
[static]
Set scale wrapper.
| AlignUtil | ||
scaleProportion(item:DisplayObject, target:Boolean, center:* = true):void
[static]
Scale an item to proportionally fit the target object (based on the smallest side).
| AlignUtil | ||
scaleRatio(item:DisplayObject, targetW:Number, targetH:Number):void
[static]
Scale an item (largest side) while retaining the original width:height ratio.
| AlignUtil | ||
scaleRatioToFit(item:DisplayObject, targetW:Number, targetH:Number):void
[static]
Scale an item (smallest side) while retaining the original width:height ratio.
| AlignUtil | ||
scaleRatioToStage(item:DisplayObject, center:Boolean = true):void
[static]
Scale an item's largest side to the stage while retaining it's original width:height ratio.
| AlignUtil | ||
scaleToFit(item:DisplayObject, targetW:Number, targetH:Number, center:Boolean):void
[static]
Scale target item to fit within target confines.
| AlignUtil | ||
stageAlignBottom(item:DisplayObject):void
[static]
Align object to stage bottom.
| AlignUtil | ||
stageAlignCenter(item:DisplayObject):void
[static]
Center align object to stage.
| AlignUtil | ||
stageAlignProportion(item:DisplayObject, propX:Number, propY:Number):void
[static]
Align object to stage by width/height proportion.
| AlignUtil | ||
stageAlignRight(item:DisplayObject):void
[static]
Align object to stage right.
| AlignUtil | ||
stageAlignXCenter(item:DisplayObject):void
[static]
Horizontal center align object to stage.
| AlignUtil | ||
stageAlignXProportion(item:DisplayObject, prop:Number):void
[static]
Align object centered, but based on a proportion (instead of 50/50).
| AlignUtil | ||
stageAlignYCenter(item:DisplayObject):void
[static]
Vertical center align object to stage.
| AlignUtil | ||
stageAlignYProportion(item:DisplayObject, prop:Number):void
[static]
Align object centered, but based on a proportion (instead of 50/50).
| AlignUtil | ||
xAlignCenter(item:DisplayObject, target:DisplayObject):void
[static]
Horizontal center align object to target.
| AlignUtil | ||
xAlignLeft(item:DisplayObject, target:DisplayObject):void
[static]
Horizontal left align object to target.
| AlignUtil | ||
xAlignRight(item:DisplayObject, target:DisplayObject):void
[static]
Horizontal right align object to target.
| AlignUtil | ||
yAlignCenter(item:DisplayObject, target:DisplayObject):void
[static]
Vertical center align object to target.
| AlignUtil | ||
yAlignLeft(item:DisplayObject, target:DisplayObject):void
[static]
Vertical left align object to target.
| AlignUtil | ||
yAlignRight(item:DisplayObject, target:DisplayObject):void
[static]
Vertical right align object to target.
| AlignUtil |
AlignUtil | () | constructor |
public function AlignUtil()
AlignUtil Static Constructor
alignCenter | () | method |
public static function alignCenter(item:DisplayObject, target:DisplayObject):void
Center align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
alignLeft | () | method |
public static function alignLeft(item:DisplayObject, target:DisplayObject):void
Left align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
alignRight | () | method |
public static function alignRight(item:DisplayObject, target:DisplayObject):void
Right align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
flip | () | method |
public static function flip(obj:Object, axis:String = "y"):void
Flip object on an axis.
Parametersobj:Object — to flip
|
|
axis:String (default = "y ") — to flip on ["x" or "y"]
|
— on invalid axis .
|
scale | () | method |
public static function scale(item:DisplayObject, scale:Number):void
Set scale wrapper.
Parametersitem:DisplayObject — to be scaled.
|
|
scale:Number — scale percentage [0-100].
|
scaleProportion | () | method |
public static function scaleProportion(item:DisplayObject, target:Boolean, center:* = true):void
Scale an item to proportionally fit the target object (based on the smallest side). Note: this method doesn't use the
scaleX, scaleY
properties but uses width, height
instead.
item:DisplayObject — to be scaled.
|
|
target:Boolean — to be proportionally scaled to. Note: this may be a DisplayObject or Stage .
|
|
center:* (default = true ) — whether to center the item to the target or not.
|
AlignUtil.scaleProportion( myBox, Canvas.stage, true ); // proportionally resize the item to fit the stage and center it.
scaleRatio | () | method |
public static function scaleRatio(item:DisplayObject, targetW:Number, targetH:Number):void
Scale an item (largest side) while retaining the original width:height ratio.
Parametersitem:DisplayObject — to be scaled.
|
|
targetW:Number — item target width.
|
|
targetH:Number — item target height.
|
scaleRatioToFit | () | method |
public static function scaleRatioToFit(item:DisplayObject, targetW:Number, targetH:Number):void
Scale an item (smallest side) while retaining the original width:height ratio.
Parametersitem:DisplayObject — to be scaled.
|
|
targetW:Number — whether to center the item on stage or not.
|
|
targetH:Number |
scaleRatioToStage | () | method |
public static function scaleRatioToStage(item:DisplayObject, center:Boolean = true):void
Scale an item's largest side to the stage while retaining it's original width:height ratio.
Parametersitem:DisplayObject — to be scaled.
|
|
center:Boolean (default = true ) — whether to center the item on stage or not.
|
scaleToFit | () | method |
public static function scaleToFit(item:DisplayObject, targetW:Number, targetH:Number, center:Boolean):void
Scale target item to fit within target confines.
Parametersitem:DisplayObject — to be aligned
|
|
targetW:Number — item target width.
|
|
targetH:Number — item target height.
|
|
center:Boolean — object
|
stageAlignBottom | () | method |
public static function stageAlignBottom(item:DisplayObject):void
Align object to stage bottom.
Parametersitem:DisplayObject |
stageAlignCenter | () | method |
public static function stageAlignCenter(item:DisplayObject):void
Center align object to stage.
Parametersitem:DisplayObject |
stageAlignProportion | () | method |
public static function stageAlignProportion(item:DisplayObject, propX:Number, propY:Number):void
Align object to stage by width/height proportion.
Parametersitem:DisplayObject — DisplayObject to be aligned.
|
|
propX:Number — proportion to align from top (i.e for 75/25 proportion pass .75); 1 is fully right justified; 0 is left justified;
|
|
propY:Number — proportion to align from top (i.e for 75/25 proportion pass .75); 1 is fully bottom justified; 0 is top justified;
|
stageAlignRight | () | method |
public static function stageAlignRight(item:DisplayObject):void
Align object to stage right.
Parametersitem:DisplayObject |
stageAlignXCenter | () | method |
public static function stageAlignXCenter(item:DisplayObject):void
Horizontal center align object to stage.
Parametersitem:DisplayObject |
stageAlignXProportion | () | method |
public static function stageAlignXProportion(item:DisplayObject, prop:Number):void
Align object centered, but based on a proportion (instead of 50/50).
Parametersitem:DisplayObject — DisplayObject to be aligned.
|
|
prop:Number — proportion to align from top (i.e for 75/25 proportion pass .75); 1 is fully right justified; 0 is left justified;
|
stageAlignYCenter | () | method |
public static function stageAlignYCenter(item:DisplayObject):void
Vertical center align object to stage.
Parametersitem:DisplayObject |
stageAlignYProportion | () | method |
public static function stageAlignYProportion(item:DisplayObject, prop:Number):void
Align object centered, but based on a proportion (instead of 50/50).
Parametersitem:DisplayObject — DisplayObject to be aligned.
|
|
prop:Number — proportion to align from top (i.e for 75/25 proportion pass .75); 1 is fully bottom justified; 0 is top justified;
|
xAlignCenter | () | method |
public static function xAlignCenter(item:DisplayObject, target:DisplayObject):void
Horizontal center align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
xAlignLeft | () | method |
public static function xAlignLeft(item:DisplayObject, target:DisplayObject):void
Horizontal left align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
xAlignRight | () | method |
public static function xAlignRight(item:DisplayObject, target:DisplayObject):void
Horizontal right align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
yAlignCenter | () | method |
public static function yAlignCenter(item:DisplayObject, target:DisplayObject):void
Vertical center align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
yAlignLeft | () | method |
public static function yAlignLeft(item:DisplayObject, target:DisplayObject):void
Vertical left align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |
yAlignRight | () | method |
public static function yAlignRight(item:DisplayObject, target:DisplayObject):void
Vertical right align object to target.
Parametersitem:DisplayObject |
|
target:DisplayObject |