Direct Known Subclasses
The Loader control displays the contents of a specified SWF or JPG file. It has properties that let you scale its contents and accept setSize calls. It can also resize itself to fit the size of its contents. By default, content is scaled to fit the size of the Loader control. It can also load content on demand programmatically, and monitor the progress of a load.
A Loader component cannot receive focus. However, content loaded into the Loader component can accept focus and have its own focus interactions. Although the Loader is essentially a control, it extends the View container.
MXML Syntax
The <mx:Loader> tag inherits all the properties of its parent classes, and the following properties:<mx:Loader
autoLoad="true|false"
brokenImage="No default."
contentPath="No default."
horizontalAlign="left|center|right"
scaleContent="true|false"
verticalAlign="top|middle|bottom"
complete="Event handler; no default."
progress="Event handler; no default."
/>
| Methods | |
| load(url:String) : Void
Begins loading an image or SWF file. |
| Methods inherited from class mx.core.View |
init
draw
createChild
getChildAt
getChildIndex
setChildIndex
destroyAllChildren
destroyChild
destroyChildAt
getViewMetrics
|
| Methods inherited from class mx.core.UIComponent |
getFocus
setFocus
getFocusManager
|
| Properties | |
static | version:String
ComponentVersion is for internal use only. |
| autoLoad:Boolean
[Read-Write]
If true, the content loads automatically. |
| brokenImage:String
[Read-Write]
Image to display if load fails. |
| bytesLoaded:Number
[Read-Only]
Number of bytes of the image or SWF file already loaded. |
| bytesTotal:Number
[Read-Only]
Total size of the image or SWF file. |
| content:UIComponent
[Read-Only]
Content of the Loader. |
| contentPath:String
[Read-Write]
Absolute or relative URL of the image or SWF file to load. |
| percentLoaded:Number
[Read-Only]
Percent of the image or SWF file already loaded. |
| scaleContent:Boolean
[Read-Write]
If true, the content scales to fit the Loader. |
| Properties inherited from class mx.core.View |
version
className
numChildren
|
| Properties inherited from class mx.core.UIComponent |
version
enabled
tabIndex
|
| Effects |
| Effects inherited from class mx.core.UIComponent |
showEffect
hideEffect
focusInEffect
focusOutEffect
|
| Effects inherited from class mx.core.UIObject |
creationCompleteEffect
moveEffect
resizeEffect
mouseDownEffect
mouseOverEffect
mouseOutEffect
mouseUpEffect
|
| Events | |
complete | Broadcast when content loading is complete. This event is broadcast regardless of whether the load was triggered by an autoload or an explicit load() call. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
progress | Broadcast when content is loading. This event is broadcast regardless of whether the load was triggered by an autoload or an explicit load() call. Note: The progress event is not guaranteed to be dispatched. The complete event may be received, without any progress events being dispatched. This can happen when the loaded content is a local file. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
| Events inherited from class: mx.core.View |
childCreated
childIndexChanged
childDestroyed
|
| Events inherited from class: mx.core.UIComponent |
focusIn
focusOut
keyDown
keyUp
show
hide
valid
invalid
valueCommitted
|
| Styles | |
horizontalAlign |
CSS Inheritance: no
Horizontal alignment of the image when it does not have a one-to-one aspect ratio. The default value is left. Possible values are left, center, and right. |
verticalAlign |
CSS Inheritance: no
Vertical alignment of the image when it does not have a one-to-one aspect ratio. The default value is top. Possible values are top, middle, and bottom. |
| Styles inherited from class mx.core.UIObject |
color
fontFamily
fontSize
fontStyle
fontWeight
textAlign
textDecoration
textIndent
marginLeft
marginRight
horizontalGap
verticalGap
|
| Method Detail |
load(url:String) : Void
Parameters
url - Absolute or relative URL of image or SWF file to load.
| Property Detail |
autoLoad:Boolean
[Read-Write]
brokenImage:String
[Read-Write]
bytesLoaded:Number
[Read-Only]
bytesTotal:Number
[Read-Only]
content:UIComponent
[Read-Only]
contentPath:String
[Read-Write]
percentLoaded:Number
[Read-Only]
scaleContent:Boolean
[Read-Write]
static version:String