Packagecom.afcomponents.umap.display.infowindow
Classpublic class AssetPanel
InheritanceAssetPanel Inheritance Panel Inheritance flash.display.Sprite
ImplementsIPanel

Asset panel loads a generic DisplayObject as it's content. Specify the panel's content via the InfoWindow.content property.


Example
Template project:
 import com.afcomponents.umap.core.UMap;
 import com.afcomponents.umap.display.infowindow.AssetPanel;
  
 // create UMap object
 var map:UMap = new UMap();
 map.setSize(550, 400);
 addChild(map);
 
 // add code below to define info window's param object
 // ...
 
 // open info window with a specified content
 map.openInfoWindow(param);
 
Content can be a DisplayObject instance:

Add this lines below // ...
 // create a generic asset
 var asset:Sprite = new Sprite();
 asset.graphics.beginFill(0xff0000, 0.5);
 asset.graphics.drawRect(0, 0, 100, 50);
 
 // init info window param object
 var param:Object = {
  content: asset,
  contentType: AssetPanel
 }
 
Content can be a Class object reference:

Add this lines below // ...
 import package.my.MyAssetClass;
 // init info window param object
 var param:Object = {
  content: MyAssetClass,
  contentType: AssetPanel
 }
 
Content can be a String which specifies the class name of a symbol in the library or any other definition:

Add this lines below // ...
 import package.my.MyAssetClass;
 // init info window param object
 var param:Object = {
  content: "package.my::MyAssetClass",
  contentType: AssetPanel
 }
 
Consider using ContentType constants instead of direct class importing.

See also

com.afcomponents.umap.display.InfoWindow
com.afcomponents.umap.styles.MediaStyle
com.afcomponents.umap.styles.ContentType


Public Properties
 PropertyDefined by
 InheritedasDisplayObject : DisplayObject
Returns a reference to the Panel as a DisplayObject.
Panel
  content : DisplayObject
[read-only] Returna a reference to the content display object.
AssetPanel
Protected Properties
 PropertyDefined by
 Inherited_autoSize : String
Auto size type.
Panel
  _content : DisplayObject
Panel content.
AssetPanel
 Inherited_data : *
Panel data.
Panel
 Inherited_maxSize : Size
Maximum possible size.
Panel
 Inherited_size : Size
Desired size.
Panel
  _style : MediaStyle
Media style for content styling.
AssetPanel
Public Methods
 MethodDefined by
  
clearContent():void
Removes content form the display list and destroys the reference to it.
AssetPanel
 Inherited
close():void
Invoked by info window when it has been closed.
Panel
 Inherited
dispose():void
Invoked by Info Window to tell the panel auto size type and maximum size.
Panel
 Inherited
getData():*
Returns panel data.
Panel
 Inherited
Returns actual size of the Panel.
Panel
 Inherited
Returns the style object associated with the panel.
Panel
 Inherited
init(data:*, maxSize:Size, autoSizeType:String, style:Object = null):void
Initalizes the panel options.
Panel
 Inherited
move(x:Number, y:Number):void
Moves panel to the specified point.
Panel
 Inherited
reset():void
Refreshes the panel.
Panel
 Inherited
resize():void
Invoked when the size of the panel should be updated.
Panel
 Inherited
setData(value:*):void
Sets new panel data.
Panel
 Inherited
setFinalSize(size:Size):void
Invoked by InfoWindow to inform the Panel about the final available size for the panel.
Panel
 Inherited
setSize(size:Size, maxSize:Size = null):void
Invoked by InfoWindow to inform the Panel about the desired size.
Panel
 Inherited
setStyle(style:Object):void
Sets the style of the panel.
Panel
Property detail
_contentproperty
protected var _content:DisplayObject

Panel content.

contentproperty 
content:DisplayObject  [read-only]

Returna a reference to the content display object.

Implementation
    public function get content():DisplayObject
_styleproperty 
protected var _style:MediaStyle

Media style for content styling.

Method detail
clearContent()method
public function clearContent():void

Removes content form the display list and destroys the reference to it. If you want to perfom custom cleanup, catch Event.REMOVED_FROM_STAGE event in your asset.