Abstract class for A icon with a decorative displayObject.
protected var asset:DisplayObject
protected var assetContainer:DisplayObjectContainer
protected var height:int
protected var maskShape:Shape
protected var scale:Boolean
protected var width:int
public function AssetIcon(asset:DisplayObject = null, width:int = -1, height:int = -1, scale:Boolean = false)
Creates a AssetIcon with a path to load external content.
Parameters
| asset:DisplayObject (default = null) — the path of the external content.
|
| |
| 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. If you do not specified the with, it will use
asset.width.
|
| |
| 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. If you do not specified the height, it will use
asset.height.
|
| |
| scale:Boolean (default = false) — (optional)whether scale MC to fix the width and height specified. Default is true
|
public function getAsset():DisplayObject
Returns
public function getDisplay(c:Component):DisplayObjectParameters
Returns
public function getIconHeight(c:Component):intParameters
Returns
public function getIconWidth(c:Component):intParameters
Returns
protected function setHeight(height:int):voidParameters
protected function setWidth(width:int):voidParameters
public function updateIcon(c:Component, g:Graphics2D, x:int, y:int):voidParameters