Packagecom.ghostwire.ui.controls
Classpublic class uiSWF
InheritanceuiSWF Inheritance uiPane Inheritance uiComponent Inheritance flash.display.Sprite

The uiSWF control is used to load and contain an external interactive SWF. Use this class when you want to load an external application SWF (module) into a host application SWF.

The uiSWF control does not scale its content. If the allocated space is smaller than the loaded content, the portions of the content falling outside the allocated space will not be visible.

The uiSWF is a subclass of uiPane making it suitable to be plugged into a uiScrollPane container as the content. In this case, if the allocated space is smaller than the loaded content, the content is scrollable. Obviously, the loaded content should not wrap itself in another uiScrollPane instance since it is already going to be plugged into one.

Note: If you are looking to load an external image or non-interactive SWF, use the uiImage control instead.

~ This class is available in Aspire UI Components Standard Edition ~



Public Properties
 PropertyDefined by
 InheritedalignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
uiComponent
 InheritedalignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
uiComponent
 Inheritedbackground : Object
Indicates the style of the background for this component.
uiComponent
 Inheritedcontainer : uiComponent
Indicates the uiComponent instance that contains this instance.
uiComponent
  content : DisplayObject
[read-only] Returns a reference to the root DisplayObject of the SWF file loaded into the uiSWF container.
uiSWF
 Inheriteddepth : int
Indicates how deep the component is in the containment hierarchy.
uiComponent
 InheriteddesiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
uiComponent
 InheriteddesiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
uiComponent
 Inheritedenabled : Boolean
Indicates whether the component is enabled for user interaction.
uiComponent
 InheritedfillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated horizontal space.
uiComponent
 InheritedfillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated vertical space.
uiComponent
 InheritedfocusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus rectangle.
uiComponent
 InheritedfocusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it is in focus.
uiComponent
 Inheritedheight : Number
Indicates the current height of the component.
uiComponent
  loader : Loader
[read-only] Returns a reference to the embedded Loader object - for advanced users only.
uiSWF
  loaderContext : LoaderContext
Indicates the LoaderContext object to use to control loading of the external SWF.
uiSWF
 Inheritedmargin : Object
Indicates the thickness of the space surrounding the component.
uiComponent
 InheritedmaxHeight : int
Indicates the upper limit for height.
uiComponent
 InheritedmaxWidth : int
Indicates the upper limit for width.
uiComponent
 InheritedminHeight : int
Indicates the lower limit for height.
uiComponent
 InheritedminWidth : int
Indicates the lower limit for width.
uiComponent
 Inheritedpadding : Object
Indicates the thickness of the interior space from the edge of the component to the content area, which is where child components, if any, are contained.
uiComponent
 Inheritedskin : String
Indicates the name of the skin to use for this component instance.
uiComponent
  source : String
Indicates the source of the external SWF.
uiSWF
 Inheritedstretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this component.
uiComponent
 InheritedtextStyle : String
Indicates the style to use for uiText instances contained in this component.
uiComponent
 InheritedtoolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers over this control.
uiComponent
 Inheriteduiskin : uiBitmapImage
Returns the uiBitmapImage rendered as the skin - for advanced users only.
uiComponent
 Inheritedvisible : Boolean
Indicates whether or not the component is visible within its container.
uiComponent
 Inheritedwidth : Number
Indicates the current width of the component.
uiComponent
Public Methods
 MethodDefined by
  
Constructor - creates a new uiSWF instance.
uiSWF
 Inherited
addChild(child:DisplayObject):DisplayObject
Adds a child DisplayObject instance to this container.
uiPane
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
Adds a child DisplayObject instance to this container at the specified index position.
uiPane
 Inherited
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
uiComponent
 Inherited
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
uiComponent
 Inherited
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
uiComponent
 Inherited
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its tabEnabled property set to true, otherwise this method will fail silently.
uiComponent
 Inherited
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified width and height.
uiComponent
 Inherited
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
uiComponent
  
unload():void
Unloads the content.
uiSWF
 Inherited
validateNow():void
Validates and render the component instance, and any component instances with depth higher than itself in the validation queue, immediately.
uiComponent
Events
 EventSummaryDefined by
 Inherited Dispatched when the component's visible property is changed from true to false via calling the setVisible() method.uiComponent
   Dispatched when the external SWF has been loaded.uiSWF
   Dispatched when loading of the external SWF has failed.uiSWF
 Inherited Dispatched when the component's position within its parent container has changed via calling the move() method.uiComponent
   Dispatched when data is received as the download of the external SWF progresses.uiSWF
 Inherited Dispatched when the component's size has changed via calling the setSize() method.uiComponent
 Inherited Dispatched when the component's visible property is changed from false to true via calling the setVisible() method.uiComponent
   Dispatched when the loaded SWF is unloaded, either via the unload() method or by setting the source property to a different value.uiSWF
Property detail
contentproperty
content:DisplayObject  [read-only]

Returns a reference to the root DisplayObject of the SWF file loaded into the uiSWF container. You should not attempt to remove this content, or re-parent this content (via "kidnapping" methods). To remove/unload the content, set the source property to null.

The property returns null if no content has been loaded yet. Listen to the Event.INIT event if you wish to be notified when the content is loaded.

Implementation
    public function get content():DisplayObject
loaderproperty 
loader:Loader  [read-only]

Returns a reference to the embedded Loader object - for advanced users only. This property is exposed in case you need greater control over the Loader object.

Implementation
    public function get loader():Loader
loaderContextproperty 
loaderContext:LoaderContext  [read-write]

Indicates the LoaderContext object to use to control loading of the external SWF. The uiSWFLoader class uses the Flash native Loader class for its loading process. This LoaderContext object will be passed as the second parameter to the load() method of the Loader object. Setting this property will not initiate a loading process; you must set this property before you set (or modify) the source property (which in turn initiates a load process).

Implementation
    public function get loaderContext():LoaderContext
    public function set loaderContext(value:LoaderContext):void
sourceproperty 
source:String  [read-write]

Indicates the source of the external SWF.

Setting this property to a non-null String initiates a load process.

To remove existing content, set this property to null.

Implementation
    public function get source():String
    public function set source(value:String):void
Constructor detail
uiSWF()constructor
public function uiSWF()

Constructor - creates a new uiSWF instance.

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

Unloads the content.

Event detail
initevent 
Event object type: flash.events.Event

Dispatched when the external SWF has been loaded.

ioErrorevent  
Event object type: flash.events.IOErrorEvent.IO_ERROR

Dispatched when loading of the external SWF has failed.

progressevent  
Event object type: flash.events.ProgressEvent.PROGRESS

Dispatched when data is received as the download of the external SWF progresses. You can listen to this event and track the download progress.

This event has the following properties:

PropertyValue
bubblesfalse
bytesLoadedThe accumulated number of bytes loaded at the time the listener processes the event.
bytesTotalThe total number of bytes that will ultimately be loaded if the loading process completes successfully.
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe object reporting progress.
unloadevent  
Event object type: flash.events.Event

Dispatched when the loaded SWF is unloaded, either via the unload() method or by setting the source property to a different value.