Packagecom.adobe.portfolio.components.supportClasses
Classpublic class FlashContainer
InheritanceFlashContainer Inheritance spark.components.SkinnableContainer
Implements IFlashComponent

A FlashContainer is used to reference an object type in an external SWF file. This allows assets to be accessed dynamically rather than requiring them as a SWC at compile time. If the referenced object cannot be found, then the contents of the container are displayed instead.

Default MXML PropertymxmlContentFactory



Public Properties
 PropertyDefined By
  swfClass : String
Returns the name of the stage instance for this component within a designer skin swf.
FlashContainer
  useFlashAsset : Boolean
True if the referenced SWF object should be displayed; false otherwise.
FlashContainer
Protected Properties
 PropertyDefined By
  skinObj : DisplayObject = null
The DisplayObject in the swf that should be rendered by this component.
FlashContainer
  skinsAreLoaded : Boolean
A Boolean indicating whether or not the skins contained in the swf have been loaded.
FlashContainer
Public Methods
 MethodDefined By
  
Default constructor.
FlashContainer
Protected Methods
 MethodDefined By
  
Initializes skinObj based on the current loaded swf and swfClass.
FlashContainer
  
measure():void
[override] Measures the contents of this Flex container.
FlashContainer
  
onResize(evt:ResizeEvent):void
An event listener to respond when this element is resized.
FlashContainer
  
onSkinsLoaded(evt:Event):void
An event listener to respond when a swf is loaded or unloaded.
FlashContainer
  
setSource():void
Sets the source of this component appropriately based on the availability of skinObj.
FlashContainer
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
flashImage:mx.controls.Image
Required: true Part Type: Static
An image skin part where the SWF object will be rendered.
FlashContainer
Property Detail
skinObjproperty
protected var skinObj:DisplayObject = null

The DisplayObject in the swf that should be rendered by this component.

skinsAreLoadedproperty 
skinsAreLoaded:Boolean

A Boolean indicating whether or not the skins contained in the swf have been loaded.


Implementation
    protected function get skinsAreLoaded():Boolean
    protected function set skinsAreLoaded(value:Boolean):void
swfClassproperty 
swfClass:String

Returns the name of the stage instance for this component within a designer skin swf.


Implementation
    public function get swfClass():String
    public function set swfClass(value:String):void

See also

FlashSkinManager
useFlashAssetproperty 
useFlashAsset:Boolean

True if the referenced SWF object should be displayed; false otherwise.

This property can be used as the source for data binding.


Implementation
    public function get useFlashAsset():Boolean
    public function set useFlashAsset(value:Boolean):void
Constructor Detail
FlashContainer()Constructor
public function FlashContainer()

Default constructor.

Method Detail
initSkinObj()method
protected function initSkinObj():void

Initializes skinObj based on the current loaded swf and swfClass.

measure()method 
override protected function measure():void

Measures the contents of this Flex container. The SWF object is not considered when measuring.

onResize()method 
protected function onResize(evt:ResizeEvent):void

An event listener to respond when this element is resized. This is important when skinObj supports the 9-slice skinning model, since a simple scaling is not sufficient when redrawing.

Parameters

evt:ResizeEvent

onSkinsLoaded()method 
protected function onSkinsLoaded(evt:Event):void

An event listener to respond when a swf is loaded or unloaded.

Parameters

evt:Event

setSource()method 
protected function setSource():void

Sets the source of this component appropriately based on the availability of skinObj. If skinObj is non-null, then it is sized properly and used as the source. Otherwise the _backup Bitmap is used if it is non-null.