| Package | sekati.utils |
| Class | public class DisplayUtil |
| Method | Defined by | ||
|---|---|---|---|
|
DisplayUtil Static Constructor
| DisplayUtil | ||
|
addChildren(o:DisplayObjectContainer, ... args):void
[static]
A bulk addChild
| DisplayUtil | ||
|
color(mc:DisplayObject, color:uint):void
[static]
Change the color of a display object, works when setting the color property of the colorTransform does not,
for "stubborn" elements.
| DisplayUtil | ||
|
getClassFromInstance(instance:DisplayObject, requiredSubclass:Class = null):Class
[static]
Useful for templated items, returns the Class object that a DisplayObject instance is an instance of.
| DisplayUtil | ||
|
getMovieFromLibrary(className:String):Sprite
[static]
Instantiate a
Sprite symbol from the library by string name. | DisplayUtil | ||
|
getNextHighestDepth(o:DisplayObjectContainer):uint
[static]
Return the next highest depth.
| DisplayUtil | ||
|
makeButton(o:Sprite, enabled:Boolean = true):void
[static]
Turns button behavior of a sprite on/off.
| DisplayUtil | ||
|
removeChildren(o:DisplayObjectContainer):void
[static]
Removes all display children from a container.
| DisplayUtil | ||
|
reParentDisplayObject(object:DisplayObject, newParent:DisplayObjectContainer):void
[static]
Reparent a display object while maintianing its visual continuity by syncing it's scale & rotation properties.
| DisplayUtil | ||
|
sizeContent(o:DisplayObject, child:DisplayObject = null):void
[static]
Re-scales elements on the timeline to 100% and then resizes
to fit the previously stretched dimensions.
| DisplayUtil | ||
|
unparentDisplayObjects(... args):void
[static]
Unparents all arguments passed into the method.
| DisplayUtil | ||
| DisplayUtil | () | constructor |
public function DisplayUtil()DisplayUtil Static Constructor
| addChildren | () | method |
public static function addChildren(o:DisplayObjectContainer, ... args):voidA bulk addChild
Parameterso:DisplayObjectContainer — destination object.
|
|
... args — array of DisplayObjects to add to the destination.
|
| color | () | method |
public static function color(mc:DisplayObject, color:uint):voidChange the color of a display object, works when setting the color property of the colorTransform does not, for "stubborn" elements.
Parametersmc:DisplayObject |
|
color:uint |
| getClassFromInstance | () | method |
public static function getClassFromInstance(instance:DisplayObject, requiredSubclass:Class = null):ClassUseful for templated items, returns the Class object that a DisplayObject instance is an instance of. You can pass another class to ensure that the class is a subclass or implementor of a certain class or interface.
Parametersinstance:DisplayObject |
|
requiredSubclass:Class (default = null) |
Class |
| getMovieFromLibrary | () | method |
public static function getMovieFromLibrary(className:String):Sprite
Instantiate a Sprite symbol from the library by string name.
className:String |
Sprite |
var myBox : Sprite = DisplayUtil.getMovieFromLibrary( "Box" ); addChild( myBox );
| getNextHighestDepth | () | method |
public static function getNextHighestDepth(o:DisplayObjectContainer):uintReturn the next highest depth.
Parameterso:DisplayObjectContainer |
uint |
;
this.setChildIndex( mySprite, DisplayUtil.getNextHighestDepth( mySprite ) );
| makeButton | () | method |
public static function makeButton(o:Sprite, enabled:Boolean = true):voidTurns button behavior of a sprite on/off.
Parameterso:Sprite |
|
enabled:Boolean (default = true) |
| removeChildren | () | method |
public static function removeChildren(o:DisplayObjectContainer):voidRemoves all display children from a container.
Parameterso:DisplayObjectContainer |
| reParentDisplayObject | () | method |
public static function reParentDisplayObject(object:DisplayObject, newParent:DisplayObjectContainer):voidReparent a display object while maintianing its visual continuity by syncing it's scale & rotation properties.
Parametersobject:DisplayObject |
|
newParent:DisplayObjectContainer |
| sizeContent | () | method |
public static function sizeContent(o:DisplayObject, child:DisplayObject = null):voidRe-scales elements on the timeline to 100% and then resizes to fit the previously stretched dimensions.
Parameterso:DisplayObject — the stretched DisplayObject.
|
|
child:DisplayObject (default = null) — if there are children of the movie, they are also stretched.
|
| unparentDisplayObjects | () | method |
public static function unparentDisplayObjects(... args):voidUnparents all arguments passed into the method.
Parameters... args |