public interface IModuleInfo extends flash.events.IEventDispatcher
Language Version :
ActionScript 3.0
Product Version :
Flex 3
Runtime Versions :
Flash Player 9, AIR 1.1
An interface that acts as a handle for a particular module.
From this interface, the module status can be queried,
its inner factory can be obtained, and it can be loaded or unloaded.
[read-only]
A flag that is true if the module is sufficiently loaded
to get a handle to its associated IFlexModuleFactory implementation
and call its create() method.
[read-only]
A flag that is true if the module is sufficiently loaded
to get a handle to its associated IFlexModuleFactory implementation
and call its info() method.
Dispatched by the backing ModuleInfo once the module is sufficiently loaded to call the IModuleInfo.factory() method and the IFlexModuleFactory.create() method.
Dispatched by the backing ModuleInfo once the module is sufficiently loaded to call the IModuleInfo.factory() method and the IFlexModuleFactory.info() method.
The IFlexModuleFactory implementation defined in the module.
This will only be non-null after the
ModuleEvent.SETUP event has been dispatched
(or the IModuleInfo.setup() method returns true).
At this point, the IFlexModuleFactory.info() method can be called.
Once a ModuleEvent.READY event is dispatched
(or the IModuleInfo.ready() method returns true),
it is possible to call the IFlexModuleFactory.create() method.
A flag that is true if the load()
method has been called on this module.
Implementation public function get loaded():Boolean
ready
property
ready:Boolean [read-only]
Language Version :
ActionScript 3.0
Product Version :
Flex 3
Runtime Versions :
Flash Player 9, AIR 1.1
A flag that is true if the module is sufficiently loaded
to get a handle to its associated IFlexModuleFactory implementation
and call its create() method.
This flag is true when the ModuleManager dispatches the
ModuleEvent.READY event.
Implementation public function get ready():Boolean
setup
property
setup:Boolean [read-only]
Language Version :
ActionScript 3.0
Product Version :
Flex 3
Runtime Versions :
Flash Player 9, AIR 1.1
A flag that is true if the module is sufficiently loaded
to get a handle to its associated IFlexModuleFactory implementation
and call its info() method.
This flag is true when the ModuleManager dispatches the
ModuleEvent.SETUP event.
Implementation public function get setup():Boolean
url
property
url:String [read-only]
Language Version :
ActionScript 3.0
Product Version :
Flex 3
Runtime Versions :
Flash Player 9, AIR 1.1
The URL associated with this module (for example, "MyImageModule.swf" or
"http://somedomain.com/modules/MyImageModule.swf". The URL can be local or remote, but
if it is remote, you must establish a trust between the module's domain and the
application that loads it.
Implementation public function get url():String
Method Detail
load
()
method
public function load(applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null, bytes:ByteArray = null, moduleFactory:IFlexModuleFactory = null):void
Language Version :
ActionScript 3.0
Product Version :
Flex 3
Runtime Versions :
Flash Player 9, AIR 1.1
Requests that the module be loaded. If the module is already loaded,
the call does nothing. Otherwise, the module begins loading and dispatches
progress events as loading proceeds.
Parameters
applicationDomain:ApplicationDomain (default = null) — The current application domain in which your code is executing.
securityDomain:SecurityDomain (default = null) — The current security "sandbox".
bytes:ByteArray (default = null) — A ByteArray object. The ByteArray is expected to contain
the bytes of a SWF file that represents a compiled Module. The ByteArray
object can be obtained by using the URLLoader class. If this parameter
is specified the module will be loaded from the ByteArray. If this
parameter is null the module will be loaded from the url specified in
the url property.
moduleFactory:IFlexModuleFactory (default = null) — The moduleFactory of the caller. One use of the
moduleFactory is to determine the parent style manager of the loaded
module.
Publishes an interface to the ModuleManager. This allows late (or decoupled)
subscriptions to factories with a String handle. Use a URL that starts with
publish:// to reference factories that are published in this manner.
Parameters
factory:IFlexModuleFactory — The class that implements the module's IFlexModuleFactory interface.
Releases the current reference to the module.
This does not unload the module unless there are no other
open references to it and the ModuleManager is set up
to have only a limited number of loaded modules.
Unloads the module.
Flash Player and AIR will not fully unload and garbage collect this module if
there are any outstanding references to definitions inside the
module.
Dispatched by the backing ModuleInfo if there was an error during
module loading.
Dispatched when there is an error downloading the module.
The ModuleEvent.ERROR constant defines the value of the
type property of the event object for an error event.
The properties of the event object have the following values:
Property
Value
bubbles
false
bytesLoaded
Empty
bytesTotal
Empty
cancelable
false
currentTarget
The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.
errorText
The error message.
target
The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.
Dispatched by the backing ModuleInfo at regular intervals
while the module is being loaded.
Dispatched when the module is in the process of downloading. This module is
dispatched at regular intervals during the download process.
The ModuleEvent.PROGRESS constant defines the value of the
type property of the event object for a progress event.
The properties of the event object have the following values:
Property
Value
bubbles
false
bytesLoaded
The number of bytes loaded.
bytesTotal
The total number of bytes to load.
cancelable
false
currentTarget
The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.
errorText
Empty
target
The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.
Dispatched by the backing ModuleInfo once the module is sufficiently
loaded to call the IModuleInfo.factory() method and the
IFlexModuleFactory.create() method.
Dispatched when the module has finished downloading.
The ModuleEvent.READY constant defines the value of the
type property of the event object for a complete event.
The properties of the event object have the following values:
Property
Value
bubbles
false
bytesLoaded
The number of bytes loaded.
bytesTotal
The total number of bytes to load.
cancelable
false
currentTarget
The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.
errorText
Empty
target
The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.
Dispatched by the backing ModuleInfo once the module is sufficiently
loaded to call the IModuleInfo.factory() method and
the IFlexModuleFactory.info() method.
Dispatched when enough of a module has been downloaded that you can get information
about the module. You do this by calling the IFlexModuleFactory.info()
method on the module.
The ModuleEvent.SETUP constant defines the value of the
type property of the event object for a setup event.
The properties of the event object have the following values:
Property
Value
bubbles
false
bytesLoaded
Empty
bytesTotal
Empty
cancelable
false
currentTarget
The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.
errorText
An error message.
target
The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.
Dispatched by the backing ModuleInfo when the module data is unloaded.
Dispatched when the module is unloaded.
The ModuleEvent.UNLOAD constant defines the value of the
type property of the event object for an unload event.
The properties of the event object have the following values:
Property
Value
bubbles
false
bytesLoaded
Empty
bytesTotal
Empty
cancelable
false
currentTarget
The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.
errorText
An error message.
target
The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.