Description Pane (AS 3.0) V. 1.1 API Docs
Properties
| Name | Type | Description |
| content | String | Text to be shown in the Description Pane. Example myDescrPane.content = "This is a test!"; |
| contentStyle | Object | Defines the appearance of the content in the Description Pane.
Example myDescrPane.contentStyle = {align:"center", font:"Arial", color:0xFF0000, size:14, embed:false, isHTML:false, verticalPadding:2, horizontalPadding:2, autoSize:true}; ActionScript TextFormat Example var myTextFormat = new TextFormat(); with (myTextFormat) { align = "center"; font = "Arial"; color = 0x0000FF; size = 15; } myDescrPane.contentStyle = {embed:false, isHTML:false, horizontalPadding:5, verticalPadding:5, textFormat:myTextFormat}; |
| delay | Object | Delay timer to show and hide the Description Pane.
Example myDescrPane.delay = {enabled:true, show:0, hide:3000}; |
| offset | Object | Offsets the Description Pane from it's original position. This allows you to adjust placement when using the setOwner() method (shown below).
Example myDescrPane.offset = {x:0, y:100}; |
| shapeStyle | Object | Defines the style of the Description Pane background.
Example myDescrPane.shapeStyle = {fill:true, fillColor:0x00FF0088, stroke:true, strokeColor:0x00000011, strokeThickness:2, radius:7}; |
| transition | Mixed | Indicates show and hide transition. Can be a string for predefined transitions, or a transition object. Example myDescrPane.transition = "Wipe"; ActionScript Transtion Example import fl.transitions.*; import fl.transitions.easing.*; myDescrPane.transition = {type:Wipe, direction:Transition.IN, duration:1, easing:Strong.easeOut, startPoint:2}; |
| visibility | String | Sets visibility of the Description Pane (on, off, autohide).
Example import com.afcomponents.descriptionpane.DescriptionPaneVisibility; myDescrPane.visibility = DescriptionPaneVisibility.OFF; |
Methods
| Name | Return Type | Description |
| show( void ) | Void | Shows the Description Pane using the specified transition and delay if it is enabled. Example myDescrPane.show(); |
| hide( void ) | Void | Hides the Description Pane using the specified transition and delay if it is enabled. Example myDescrPane.hide(); |
| setOwner( initObj:Object ) | Void | Sets the owner of the Description Pane. The Description Pane will resize and move with the owner and it will also show and hide when the mouse is over and out of the owner, respectively and visibility is set to DescriptionPaneVisibility.AUTOHIDE.
Example import com.afcomponents.descriptionpane.DescriptionPanePosition; myDescrPane.setOwner({owner:some_instance, align:DescriptionPanePosition.BOTTOM_CENTER, w:0.9, h:0.2}); |
Events
| Name | Return Value | Description |
| MouseEvent.* | Description Pane supports all standard Adobe Flash Mouse Events, unless it is added to an owner with setOwner(). Example import flash.events.MouseEvent; function descrPaneClick(event:MouseEvent) { trace(event.type); trace(event.target); } myDescrPane.addEventListener(MouseEvent.CLICK, descrPaneClick); |
|
| INITIALIZE | target type |
Triggered when the Description Pane is ready for commands. Example import com.afcomponents.events.AFComponentEvent; function descrPaneInit(event:AFComponentEvent) { trace(event.target); trace(event.type); } myDescrPane.addEventListener(AFComponentEvent.INITIALIZE, descrPaneInit); |
| SHOW | target type |
Triggered when the Description Pane show(); method has been called. Example import com.afcomponents.events.AFComponentEvent; function descrPaneShow(event:AFComponentEvent) { trace(event.target); trace(event.type); } myDescrPane.addEventListener(AFComponentEvent.SHOW, descrPaneShow); |
| HIDE | target type |
Triggered when the Description Pane show(); method has been called. Example import com.afcomponents.events.AFComponentEvent; function descrPaneHide(event:AFComponentEvent) { trace(event.target); trace(event.type); } myDescrPane.addEventListener(AFComponentEvent.HIDE, descrPaneHide); |
| CHANGE | target type property value |
Triggered any time a property changes on the Description Pane. Example import com.afcomponents.events.AFComponentEvent; function descrPaneChange(event:AFComponentEvent) { trace(event.target); trace(event.type); trace(event.property + " has changed to " + event.value); } myDescrPane.addEventListener(AFComponentEvent.CHANGE, descrPaneChange); |