| Package | com.soundstep.ui |
| Class | public class BaseUI |
| Inheritance | BaseUI 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 | ||
|---|---|---|---|
| autoRefresh : Boolean
whether or not the size/position of the DisplayObject is recalculate after a property change
this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance | BaseUI | ||
| elements : Array [read-only]
get the ElementUI list
| BaseUI | ||
| holder : DisplayObjectContainer [read-only]
return the holder
| BaseUI | ||
| keepOnScreen : Boolean
keep a DisplayObject in the screen
this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance | BaseUI | ||
| onStage : Boolean
set the stage as a reference to calculate position ans sizes, if false the parent will be the reference
this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance
| BaseUI | ||
| 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) this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance | BaseUI | ||
| Method | Defined by | ||
|---|---|---|---|
|
BaseUI(holder:DisplayObjectContainer)
Constructor
Create an instance of the BaseUI class
| BaseUI | ||
|
add a element to the BaseUI list (DisplayObject like Sprite, MovieClip, TextField, Bitmap, ...)
| BaseUI | ||
|
contains(displayObject:DisplayObject):Boolean
whether or not the BaseUI instance contains the DisplayObject
| BaseUI | ||
|
getElement(displayObject:DisplayObject):ElementUI
get the ElementUI instance
| BaseUI | ||
|
refresh():void
refresh all the elements
| BaseUI | ||
|
remove(displayObject:DisplayObject):void
remove a element from the BaseUI list
| BaseUI | ||
|
removeAll():void
remove all elements from the BaseUI list
| BaseUI | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when a display object has been added to the BaseUI instance. | BaseUI | |||
| Dispatched when a display object has been removed from the BaseUI instance. | BaseUI | |||
| autoRefresh | property |
autoRefresh:Boolean [read-write]
whether or not the size/position of the DisplayObject is recalculate after a property change
this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance
The default value is true.
public function get autoRefresh():Boolean
public function set autoRefresh(value:Boolean):void
| elements | property |
elements:Array [read-only]get the ElementUI list
Implementation public function get elements():Array
| holder | property |
holder:DisplayObjectContainer [read-only]return the holder
Implementation public function get holder():DisplayObjectContainer
| keepOnScreen | property |
keepOnScreen:Boolean [read-write]
keep a DisplayObject in the screen
this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance
The default value is true.
public function get keepOnScreen():Boolean
public function set keepOnScreen(value:Boolean):void
| 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 this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance
The default value is true.
public function get onStage():Boolean
public function set onStage(value:Boolean):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)
this is a global default value applied on every DisplayObject added to the BaseUI instance, it can be overridden in each ElementUI instance
public function get reference():DisplayObjectContainer
public function set reference(value:DisplayObjectContainer):void
| BaseUI | () | constructor |
public function BaseUI(holder:DisplayObjectContainer)Constructor Create an instance of the BaseUI class
Parametersholder:DisplayObjectContainer — DisplayObjectContainer of the BaseUI instance that will contains the elements
|
| add | () | method |
public function add(displayObject:DisplayObject):ElementUIadd a element to the BaseUI list (DisplayObject like Sprite, MovieClip, TextField, Bitmap, ...)
ParametersdisplayObject:DisplayObject — DisplayObject instance of the element to be added to the BaseUI list
|
ElementUI —
return an instance ElementUI
|
| contains | () | method |
public function contains(displayObject:DisplayObject):Booleanwhether or not the BaseUI instance contains the DisplayObject
ParametersdisplayObject:DisplayObject |
Boolean — Boolean
|
| getElement | () | method |
public function getElement(displayObject:DisplayObject):ElementUIget the ElementUI instance
ParametersdisplayObject:DisplayObject — DisplayObject instance of the DisplayObject
|
ElementUI —
return the ElementUI instance of the DisplayObject
|
| refresh | () | method |
public function refresh():voidrefresh all the elements
| remove | () | method |
public function remove(displayObject:DisplayObject):voidremove a element from the BaseUI list
ParametersdisplayObject:DisplayObject — DisplayObject instance of the element to be removed from the BaseUI list
|
| removeAll | () | method |
public function removeAll():voidremove all elements from the BaseUI list
| ADDED | event |
com.soundstep.ui.events.BaseEventUI
Dispatched when a display object has been added to the BaseUI instance.
| REMOVED | event |
com.soundstep.ui.events.BaseEventUI
Dispatched when a display object has been removed from the BaseUI instance.