Package | com.ghostwire.ui.controls |
Class | public class uiSWF |
Inheritance | uiSWF ![]() ![]() ![]() |
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 ~
Property | Defined by | ||
---|---|---|---|
![]() | alignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
| uiComponent | |
![]() | alignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
| uiComponent | |
![]() | background : Object
Indicates the style of the background for this component.
| uiComponent | |
![]() | container : 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 | ||
![]() | depth : int
Indicates how deep the component is in the containment hierarchy.
| uiComponent | |
![]() | desiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
| uiComponent | |
![]() | desiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
| uiComponent | |
![]() | enabled : Boolean
Indicates whether the component is enabled for user interaction.
| uiComponent | |
![]() | fillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
horizontal space.
| uiComponent | |
![]() | fillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
vertical space.
| uiComponent | |
![]() | focusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus
rectangle.
| uiComponent | |
![]() | focusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it
is in focus.
| uiComponent | |
![]() | height : 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 | ||
![]() | margin : Object
Indicates the thickness of the space surrounding the component.
| uiComponent | |
![]() | maxHeight : int
Indicates the upper limit for
height . | uiComponent | |
![]() | maxWidth : int
Indicates the upper limit for
width . | uiComponent | |
![]() | minHeight : int
Indicates the lower limit for
height . | uiComponent | |
![]() | minWidth : int
Indicates the lower limit for
width . | uiComponent | |
![]() | padding : 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 | |
![]() | skin : String
Indicates the name of the skin to use for this component instance.
| uiComponent | |
source : String
Indicates the source of the external SWF.
| uiSWF | ||
![]() | stretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this
component.
| uiComponent | |
![]() | textStyle : String
Indicates the style to use for
uiText instances contained in this component. | uiComponent | |
![]() | toolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers
over this control.
| uiComponent | |
![]() | uiskin : uiBitmapImage
Returns the
uiBitmapImage rendered as the skin - for advanced users only. | uiComponent | |
![]() | visible : Boolean
Indicates whether or not the component is visible within its container.
| uiComponent | |
![]() | width : Number
Indicates the current
width of the component. | uiComponent |
Method | Defined by | ||
---|---|---|---|
uiSWF()
Constructor - creates a new
uiSWF instance. | uiSWF | ||
![]() |
addChild(child:DisplayObject):DisplayObject
Adds a child
DisplayObject instance to this container. | uiPane | |
![]() |
addChildAt(child:DisplayObject, index:int):DisplayObject
Adds a child
DisplayObject instance to this container at the
specified index position. | uiPane | |
![]() |
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
| uiComponent | |
![]() |
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
| uiComponent | |
![]() |
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
| uiComponent | |
![]() |
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 | |
![]() |
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified
width and height . | uiComponent | |
![]() |
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 | ||
![]() |
validateNow():void
Validates and render the component instance, and any component instances with
depth higher than itself in the validation queue, immediately. | uiComponent |
Event | Summary | Defined by | ||
---|---|---|---|---|
![]() |
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 | |||
![]() |
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 | |||
![]() |
Dispatched when the component's size has changed via calling the setSize() method. | uiComponent | ||
![]() |
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 |
content | property |
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.
public function get content():DisplayObject
loader | property |
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.
public function get loader():Loader
loaderContext | property |
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).
public function get loaderContext():LoaderContext
public function set loaderContext(value:LoaderContext):void
source | property |
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
.
public function get source():String
public function set source(value:String):void
uiSWF | () | constructor |
public function uiSWF()
Constructor - creates a new uiSWF
instance.
unload | () | method |
public function unload():void
Unloads the content.
init | event |
ioError | event |
flash.events.IOErrorEvent.IO_ERROR
Dispatched when loading of the external SWF has failed.
progress | event |
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:
Property | Value |
---|---|
bubbles | false |
bytesLoaded | The accumulated number of bytes loaded at the time the listener processes the event. |
bytesTotal | The total number of bytes that will ultimately be loaded if the loading process completes successfully. |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object reporting progress. |
unload | event |
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.