Packageorg.aswing
Classpublic class AttachIcon
InheritanceAttachIcon Inheritance AssetIcon

Attach a displayObject from library with the linkage name to be a icon.



Protected Properties
 PropertyDefined by
 Inheritedasset : DisplayObject
AssetIcon
 InheritedassetContainer : DisplayObjectContainer
AssetIcon
 Inheritedheight : int
AssetIcon
 InheritedmaskShape : Shape
AssetIcon
 Inheritedscale : Boolean
AssetIcon
 Inheritedwidth : int
AssetIcon
Public Methods
 MethodDefined by
  
AttachIcon(assetClassName:String, applicationDomain:ApplicationDomain = null, width:int = -1, height:int = -1, scale:Boolean = false)
Attach a mc from library to be a icon.
If speciaficed the width and height, the mc will be scale to be this size if scale setted true.
AttachIcon
 Inherited
getAsset():DisplayObject
AssetIcon
 Inherited
getDisplay(c:Component):DisplayObject
AssetIcon
 Inherited
AssetIcon
 Inherited
AssetIcon
 Inherited
updateIcon(c:Component, g:Graphics2D, x:int, y:int):void
AssetIcon
Protected Methods
 MethodDefined by
  
getAttachDisplayObject(assetClassName:String, ad:ApplicationDomain):DisplayObject
return the attach displayObject if cannot create from Class then return null
AttachIcon
 Inherited
setHeight(height:int):void
AssetIcon
 Inherited
setWidth(width:int):void
AssetIcon
Constructor detail
AttachIcon()constructor
public function AttachIcon(assetClassName:String, applicationDomain:ApplicationDomain = null, width:int = -1, height:int = -1, scale:Boolean = false)

Attach a mc from library to be a icon.
If speciaficed the width and height, the mc will be scale to be this size if scale setted true. else the width and height will be the symbol's width and height.

Parameters
assetClassName:String — the linkageID of the symbol to attach
 
applicationDomain:ApplicationDomain (default = null) — the loaderObject with attach symbol,if loader is null then loader is root
 
width:int (default = -1) — (optional)if you specifiled the width of the Icon, and scale is true, the mc will be scale to this width when paint.
 
height:int (default = -1) — (optional)if you specifiled the height of the Icon, and scale is true, the mc will be scale to this height when paint.
 
scale:Boolean (default = false) — (optional)whether scale MC to fix the width and height specified. Default is true
Method detail
getAttachDisplayObject()method
protected function getAttachDisplayObject(assetClassName:String, ad:ApplicationDomain):DisplayObject

return the attach displayObject if cannot create from Class then return null

Parameters
assetClassName:String
 
ad:ApplicationDomain

Returns
DisplayObject