| Package | com.soundstep.ui |
| Class | public class ElementUI |
| Inheritance | ElementUI flash.events.EventDispatcher |
var baseUI:BaseUI = new BaseUI(this); var element:ElementUI = baseUI.add(mySprite); element.right = 10; element.bottom = 10; element.width = "50%" element.height = 200; addChild(mySprite);
| Property | Defined by | ||
|---|---|---|---|
| alignX : String
horizontal alignment when the property ratio is set to ElementUI.RATIO_IN or ElementUI.RATIO_OUT
can accept ElementUI.ALIGN_LEFT, ElementUI.ALIGN_RIGHT, ElementUI.ALIGN_CENTER | ElementUI | ||
| alignY : String
vertical alignment when the property ratio is set to ElementUI.RATIO_IN or ElementUI.RATIO_OUT
can accept ElementUI.ALIGN_CENTER, ElementUI.ALIGN_TOP, ElementUI.ALIGN_BOTTOM | ElementUI | ||
| autoRefresh : Boolean
whether or not the size/position of the DisplayObject is recalculate after a property change
| ElementUI | ||
| baseUI : BaseUI
[read-only]
return the BaseUI instance that has created the ElementUI
| ElementUI | ||
| bgMask : Shape [read-only]
get the Shape instance of the mask used when the ratio is set to ElementUI.RATIO_OUT
| ElementUI | ||
| bottom : Number
value between the bottom of the reference (stage or parent) and the ElementUI, Number or String
| ElementUI | ||
| bypassSize : Boolean
whether or not the DisplayObject will be resized (not working with ratio set to RATIO_IN or RATIO_OUT)
| ElementUI | ||
| element : DisplayObject [read-only]
get the DisplayObject handle by the ElementUI instance
| ElementUI | ||
| forceReferenceHeight : Number
force the height of the reference
| ElementUI | ||
| forceReferenceWidth : Number
force the width of the reference
| ElementUI | ||
| hasMask : Boolean [read-only]
whether or not the ElementUI has a mask applied, used when the ratio is set to ElementUI.RATIO_OUT
| ElementUI | ||
| height : * | ElementUI | ||
| horizontalCenter : Number
value from the center of the reference (stage or parent), align the ElementUI to the center on the x axis, Number or String
| ElementUI | ||
| initialHeight : Number
height of the DisplayObject when added to the BaseUI instance
| ElementUI | ||
| initialWidth : Number
width of the DisplayObject when added to the BaseUI instance
| ElementUI | ||
| keepOnScreen : Boolean
keep a DisplayObject in the screen
| ElementUI | ||
| left : Number
value between the left of the reference (stage or parent) and the ElementUI, Number or String
| ElementUI | ||
| memorized : Object [read-only]
return an Object containing the value memorized
| ElementUI | ||
| name : String
name of the ElementUI
| ElementUI | ||
| onStage : Boolean
set the stage as a reference to calculate position ans sizes, if false the parent will be the reference
| ElementUI | ||
| properties : Object
Object to get or set the ElementUI properties, for example:
element.properties = {top:0, bottom:"20", onStage:false, width:"50%"};
| ElementUI | ||
| ratio : String
type of ratio of the ElementUI, can be ElementUI.RATIO_IN or ElementUI.RATIO_OUT
any other String will set the ratio to none the following properties cannot be set or are not used a ratio has been specified: x, y, width, height, horizontalCenter and verticalCenter | ElementUI | ||
| reference : DisplayObjectContainer
specify a DisplayObjectContainer reference on which the size and position of the ElementUI will refer to
if not set, the onStage property value is the reference (onStage true = stage, onStage false = parent) | ElementUI | ||
| right : Number
value between the right of the reference (stage or parent) and the ElementUI, Number or String
| ElementUI | ||
| rounded : Boolean = true
Specify the ElementUI instance to display rounded values
| ElementUI | ||
| screenHeight : Number [read-only]
height of the ElementUI that will be displayed on the screen (after calculation)
| ElementUI | ||
| screenWidth : Number [read-only]
width of the ElementUI that will be displayed on the screen (after calculation)
| ElementUI | ||
| top : Number
value between the top of the reference (stage or parent) and the ElementUI, Number or String
| ElementUI | ||
| useInitialSize : Boolean
use the size that has been recorded when the DisplayObject has been added to the BaseUI instance
useful when a mask or other DisplayObject can disturb the real size of the DisplayObject | ElementUI | ||
| verticalCenter : Number
value from the center of the reference (stage or parent), align the ElementUI to the center on the y axis, Number or String
| ElementUI | ||
| width : *
width of the ElementUI, Number, String or percentage value
| ElementUI | ||
| x : Number
position on the x axis of the ElementUI instance, Number or String
| ElementUI | ||
| y : Number
position on the y axis of the ElementUI instance, Number or String
| ElementUI | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
Not used, instead use the add method of the BaseUI instance to create an element
| ElementUI | ||
|
dispose():void
remove the mask when the ratio is set to ElementUI.RATIO_OUT, used internally in BaseUI
| ElementUI | ||
|
forceRefresh():void
refresh the position and sizes, bypassing the refresh function
| ElementUI | ||
|
refresh():void
refresh the position and sizes only if the the DisplayObject is visible or if the alpha property is superior to 0
| ElementUI | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched before updating the DisplayObject | ElementUI | |||
| Dispatched when a display object has been updated | ElementUI | |||
| Constant | Defined by | ||
|---|---|---|---|
| ALIGN_BOTTOM : String = "bottom" [static]
static constant for the alignment (property alignY) in mode ratio_in or ratio_out (ElementUI.ALIGN_BOTTOM)
| ElementUI | ||
| ALIGN_CENTER : String = "center" [static]
static constant for the alignment (property alignX and alignY) in mode ratio_in or ratio_out (ElementUI.ALIGN_CENTER)
| ElementUI | ||
| ALIGN_LEFT : String = "left" [static]
static constant for the alignment (property alignX) in mode ratio_in or ratio_out (ElementUI.ALIGN_LEFT)
| ElementUI | ||
| ALIGN_RIGHT : String = "right" [static]
static constant for the alignment (property alignX) in mode ratio_in or ratio_out (ElementUI.ALIGN_RIGHT)
| ElementUI | ||
| ALIGN_TOP : String = "top" [static]
static constant for the alignment (property alignY) in mode ratio_in or ratio_out (ElementUI.ALIGN_TOP)
| ElementUI | ||
| RATIO_IN : String = "ratio_in" [static]
static constant for the mode ratio_in (ElementUI.RATIO_IN)
| ElementUI | ||
| RATIO_OUT : String = "ratio_out" [static]
static constant for the mode ratio_out (ElementUI.RATIO_OUT)
| ElementUI | ||
| alignX | property |
alignX:String [read-write]
horizontal alignment when the property ratio is set to ElementUI.RATIO_IN or ElementUI.RATIO_OUT
can accept ElementUI.ALIGN_LEFT, ElementUI.ALIGN_RIGHT, ElementUI.ALIGN_CENTER
public function get alignX():String
public function set alignX(value:String):void
| alignY | property |
alignY:String [read-write]
vertical alignment when the property ratio is set to ElementUI.RATIO_IN or ElementUI.RATIO_OUT
can accept ElementUI.ALIGN_CENTER, ElementUI.ALIGN_TOP, ElementUI.ALIGN_BOTTOM
public function get alignY():String
public function set alignY(value:String):void
| autoRefresh | property |
autoRefresh:Boolean [read-write]whether or not the size/position of the DisplayObject is recalculate after a property change
The default value is true.
public function get autoRefresh():Boolean
public function set autoRefresh(value:Boolean):void
| baseUI | property |
baseUI:BaseUI [read-only]return the BaseUI instance that has created the ElementUI
Implementation public function get baseUI():BaseUI
| bgMask | property |
bgMask:Shape [read-only]get the Shape instance of the mask used when the ratio is set to ElementUI.RATIO_OUT
Implementation public function get bgMask():Shape
| bottom | property |
bottom:Number [read-write]value between the bottom of the reference (stage or parent) and the ElementUI, Number or String
Implementation public function get bottom():Number
public function set bottom(value:Number):void
| bypassSize | property |
bypassSize:Boolean [read-write]whether or not the DisplayObject will be resized (not working with ratio set to RATIO_IN or RATIO_OUT)
Implementation public function get bypassSize():Boolean
public function set bypassSize(value:Boolean):void
| element | property |
element:DisplayObject [read-only]get the DisplayObject handle by the ElementUI instance
Implementation public function get element():DisplayObject
| forceReferenceHeight | property |
forceReferenceHeight:Number [read-write]force the height of the reference
Implementation public function get forceReferenceHeight():Number
public function set forceReferenceHeight(value:Number):void
| forceReferenceWidth | property |
forceReferenceWidth:Number [read-write]force the width of the reference
Implementation public function get forceReferenceWidth():Number
public function set forceReferenceWidth(value:Number):void
| hasMask | property |
hasMask:Boolean [read-only]whether or not the ElementUI has a mask applied, used when the ratio is set to ElementUI.RATIO_OUT
Implementation public function get hasMask():Boolean
| height | property |
height:* [read-write]Implementation
public function get height():*
public function set height(value:*):void
| horizontalCenter | property |
horizontalCenter:Number [read-write]value from the center of the reference (stage or parent), align the ElementUI to the center on the x axis, Number or String
Implementation public function get horizontalCenter():Number
public function set horizontalCenter(value:Number):void
| initialHeight | property |
initialHeight:Number [read-write]height of the DisplayObject when added to the BaseUI instance
Implementation public function get initialHeight():Number
public function set initialHeight(value:Number):void
| initialWidth | property |
initialWidth:Number [read-write]width of the DisplayObject when added to the BaseUI instance
Implementation public function get initialWidth():Number
public function set initialWidth(value:Number):void
| keepOnScreen | property |
keepOnScreen:Boolean [read-write]keep a DisplayObject in the screen
Implementation public function get keepOnScreen():Boolean
public function set keepOnScreen(value:Boolean):void
| left | property |
left:Number [read-write]value between the left of the reference (stage or parent) and the ElementUI, Number or String
Implementation public function get left():Number
public function set left(value:Number):void
| memorized | property |
memorized:Object [read-only]return an Object containing the value memorized
Implementation public function get memorized():Object
| name | property |
public var name:Stringname of the ElementUI
| onStage | property |
onStage:Boolean [read-write]set the stage as a reference to calculate position ans sizes, if false the parent will be the reference
Implementation public function get onStage():Boolean
public function set onStage(value:Boolean):void
| properties | property |
properties:Object [read-write]
Object to get or set the ElementUI properties, for example:
element.properties = {top:0, bottom:"20", onStage:false, width:"50%"};
public function get properties():Object
public function set properties(value:Object):void
| ratio | property |
ratio:String [read-write]
type of ratio of the ElementUI, can be ElementUI.RATIO_IN or ElementUI.RATIO_OUT
any other String will set the ratio to none
the following properties cannot be set or are not used a ratio has been specified:
x, y, width, height, horizontalCenter and verticalCenter
public function get ratio():String
public function set ratio(value:String):void
| reference | property |
reference:DisplayObjectContainer [read-write]
specify a DisplayObjectContainer reference on which the size and position of the ElementUI will refer to
if not set, the onStage property value is the reference (onStage true = stage, onStage false = parent)
public function get reference():DisplayObjectContainer
public function set reference(value:DisplayObjectContainer):void
| right | property |
right:Number [read-write]value between the right of the reference (stage or parent) and the ElementUI, Number or String
Implementation public function get right():Number
public function set right(value:Number):void
| rounded | property |
public var rounded:Boolean = trueSpecify the ElementUI instance to display rounded values
| screenHeight | property |
screenHeight:Number [read-only]height of the ElementUI that will be displayed on the screen (after calculation)
Implementation public function get screenHeight():Number
| screenWidth | property |
screenWidth:Number [read-only]width of the ElementUI that will be displayed on the screen (after calculation)
Implementation public function get screenWidth():Number
| top | property |
top:Number [read-write]value between the top of the reference (stage or parent) and the ElementUI, Number or String
Implementation public function get top():Number
public function set top(value:Number):void
| useInitialSize | property |
useInitialSize:Boolean [read-write]
use the size that has been recorded when the DisplayObject has been added to the BaseUI instance
useful when a mask or other DisplayObject can disturb the real size of the DisplayObject
public function get useInitialSize():Boolean
public function set useInitialSize(value:Boolean):void
| verticalCenter | property |
verticalCenter:Number [read-write]value from the center of the reference (stage or parent), align the ElementUI to the center on the y axis, Number or String
Implementation public function get verticalCenter():Number
public function set verticalCenter(value:Number):void
| width | property |
width:* [read-write]width of the ElementUI, Number, String or percentage value
Implementation public function get width():*
public function set width(value:*):void
| x | property |
x:Number [read-write]position on the x axis of the ElementUI instance, Number or String
Implementation public function get x():Number
public function set x(value:Number):void
| y | property |
y:Number [read-write]position on the y axis of the ElementUI instance, Number or String
Implementation public function get y():Number
public function set y(value:Number):void
| ElementUI | () | constructor |
public function ElementUI(baseUI:BaseUI, displayObject:DisplayObject)Constructor Not used, instead use the add method of the BaseUI instance to create an element
ParametersbaseUI:BaseUI — instance of the BaseUI that creates the element
|
|
displayObject:DisplayObject — instance o the DisplayObject that will be handle by the ElementUI instance
|
| dispose | () | method |
public function dispose():voidremove the mask when the ratio is set to ElementUI.RATIO_OUT, used internally in BaseUI
| forceRefresh | () | method |
public function forceRefresh():voidrefresh the position and sizes, bypassing the refresh function
| refresh | () | method |
public function refresh():voidrefresh the position and sizes only if the the DisplayObject is visible or if the alpha property is superior to 0
| BEFORE_UPDATE | event |
| UPDATED | event |
com.soundstep.ui.events.BaseEventUI
Dispatched when a display object has been updated
| ALIGN_BOTTOM | constant |
public static const ALIGN_BOTTOM:String = "bottom"static constant for the alignment (property alignY) in mode ratio_in or ratio_out (ElementUI.ALIGN_BOTTOM)
| ALIGN_CENTER | constant |
public static const ALIGN_CENTER:String = "center"static constant for the alignment (property alignX and alignY) in mode ratio_in or ratio_out (ElementUI.ALIGN_CENTER)
| ALIGN_LEFT | constant |
public static const ALIGN_LEFT:String = "left"static constant for the alignment (property alignX) in mode ratio_in or ratio_out (ElementUI.ALIGN_LEFT)
| ALIGN_RIGHT | constant |
public static const ALIGN_RIGHT:String = "right"static constant for the alignment (property alignX) in mode ratio_in or ratio_out (ElementUI.ALIGN_RIGHT)
| ALIGN_TOP | constant |
public static const ALIGN_TOP:String = "top"static constant for the alignment (property alignY) in mode ratio_in or ratio_out (ElementUI.ALIGN_TOP)
| RATIO_IN | constant |
public static const RATIO_IN:String = "ratio_in"static constant for the mode ratio_in (ElementUI.RATIO_IN)
| RATIO_OUT | constant |
public static const RATIO_OUT:String = "ratio_out"static constant for the mode ratio_out (ElementUI.RATIO_OUT)