User Guide
Loader class 817
Loader class
Inheritance MovieClip > UIObject class > UIComponent class > View > Loader
ActionScript Class Name mx.controls.Loader
The properties of the Loader class let you set content to load and monitor its loading progress
at runtime.
Setting a property of the Loader class with ActionScript overrides the parameter of the same
name set in the Property inspector or Component inspector.
Each component class has a
version property, which is a class property. Class properties are
available only on the class itself. The
version property returns a string that indicates the
version of the component. To access this property, use the following code:
trace(mx.controls.Loader.version);
Method summary for the Loader class
The following table lists the method of the Loader class.
Methods inherited from the UIObject class
The following table lists the methods the Loader class inherits from the UIObject class. When
calling these methods from the Loader object, use the form
LoaderInstance.methodName.
NOTE
The code trace(myLoaderInstance.version); returns undefined.
Method Description
Loader.load() Loads the content specified by the contentPath property.
Method Description
UIObject.createClassObject() Creates an object on the specified class.
UIObject.createObject() Creates a subobject on an object.
UIObject.destroyObject() Destroys a component instance.
UIObject.doLater() Calls a function when parameters have been set in the
Property and Component inspectors.
UIObject.getStyle() Gets the style property from the style declaration or object.
UIObject.invalidate() Marks the object so it is redrawn on the next frame interval.
UIObject.move() Moves the object to the requested position.