| Package | com.afcomponents.umap.display.infowindow |
| Class | public class AssetPanel |
| Inheritance | AssetPanel Panel flash.display.Sprite |
| Implements | IPanel |
DisplayObject as it's content.
Specify the panel's content via the InfoWindow.content property.
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);
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
}
Class object reference:
Add this lines below // ...
import package.my.MyAssetClass;
// init info window param object
var param:Object = {
content: MyAssetClass,
contentType: AssetPanel
}
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
}
ContentType constants instead of direct class importing.
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | asDisplayObject : DisplayObject
Returns a reference to the Panel as a DisplayObject.
| Panel | |
| content : DisplayObject [read-only]
Returna a reference to the content display object.
| AssetPanel | ||
| Property | Defined by | ||
|---|---|---|---|
![]() | _autoSize : String
Auto size type.
| Panel | |
| _content : DisplayObject
Panel content.
| AssetPanel | ||
![]() | _data : *
Panel data.
| Panel | |
![]() | _maxSize : Size
Maximum possible size.
| Panel | |
![]() | _size : Size
Desired size.
| Panel | |
| _style : MediaStyle
Media style for content styling.
| AssetPanel | ||
| Method | Defined by | ||
|---|---|---|---|
|
clearContent():void
Removes content form the display list and destroys the reference to it.
| AssetPanel | ||
![]() |
close():void
Invoked by info window when it has been closed.
| Panel | |
![]() |
dispose():void
Invoked by Info Window to tell the panel auto size type and maximum size.
| Panel | |
![]() |
getData():*
Returns panel data.
| Panel | |
![]() |
Returns actual size of the Panel.
| Panel | |
![]() |
Returns the style object associated with the panel.
| Panel | |
![]() |
Initalizes the panel options.
| Panel | |
![]() |
move(x:Number, y:Number):void
Moves panel to the specified point.
| Panel | |
![]() |
reset():void
Refreshes the panel.
| Panel | |
![]() |
resize():void
Invoked when the size of the panel should be updated.
| Panel | |
![]() |
setData(value:*):void
Sets new panel data.
| Panel | |
![]() |
setFinalSize(size:Size):void
Invoked by InfoWindow to inform the Panel about the final available size for the panel.
| Panel | |
![]() |
Invoked by InfoWindow to inform the Panel about the desired size.
| Panel | |
![]() |
setStyle(style:Object):void
Sets the style of the panel.
| Panel | |
| _content | property |
protected var _content:DisplayObjectPanel content.
| content | property |
content:DisplayObject [read-only]Returna a reference to the content display object.
Implementation public function get content():DisplayObject
| _style | property |
protected var _style:MediaStyleMedia style for content styling.
| 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.