Pacotemx.modules
Interfacepublic interface IModuleInfo extends IEventDispatcher

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.



Propriedades Públicas
 PropriedadeDefinido por
  data : Object
User data that can be associated with the singleton IModuleInfo for a given URL.
IModuleInfo
  error : Boolean
[read-only] A flag that is true if there was an error during module loading.
IModuleInfo
  factory : IFlexModuleFactory
[read-only] The IFlexModuleFactory implementation defined in the module.
IModuleInfo
  loaded : Boolean
[read-only] A flag that is true if the load() method has been called on this module.
IModuleInfo
  ready : Boolean
[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.
IModuleInfo
  setup : Boolean
[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.
IModuleInfo
  url : String
[read-only] The URL associated with this module (for exemplo, "MyImageModule.swf" or "http://somedomain.com/modules/MyImageModule.swf".
IModuleInfo
Métodos Públicos
 MétodoDefinido por
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
IEventDispatcher
 Inherited
Dispatches an event into the event flow.
IEventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
IEventDispatcher
  
load(applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null):void
Requests that the module be loaded.
IModuleInfo
  
Publishes an interface to the ModuleManager.
IModuleInfo
  
Releases the current reference to the module.
IModuleInfo
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
IEventDispatcher
  
Unloads the module.
IModuleInfo
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
IEventDispatcher
Eventos
 Evento Descrição Definido por
   Dispatched by the backing ModuleInfo if there was an error during module loading.IModuleInfo
   Dispatched by the backing ModuleInfo at regular intervals while the module is being loaded.IModuleInfo
   Dispatched by the backing ModuleInfo once the module is sufficiently loaded to call the IModuleInfo.factory() method and the IFlexModuleFactory.create() method.IModuleInfo
   Dispatched by the backing ModuleInfo once the module is sufficiently loaded to call the IModuleInfo.factory() method and the IFlexModuleFactory.info() method.IModuleInfo
   Dispatched by the backing ModuleInfo when the module data is unloaded.IModuleInfo
Detalhes da propriedade
datapropriedade
data:Object  [read-write]

User data that can be associated with the singleton IModuleInfo for a given URL.


Implementação
    public function get data():Object
    public function set data(value:Object):void
errorpropriedade 
error:Boolean  [read-only]

A flag that is true if there was an error during module loading.

This flag is true when the ModuleManager dispatches the ModuleEvent.ERROR event.


Implementação
    public function get error():Boolean
factorypropriedade 
factory:IFlexModuleFactory  [read-only]

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.


Implementação
    public function get factory():IFlexModuleFactory
loadedpropriedade 
loaded:Boolean  [read-only]

A flag that is true if the load() method has been called on this module.


Implementação
    public function get loaded():Boolean
readypropriedade 
ready:Boolean  [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.

This flag is true when the ModuleManager dispatches the ModuleEvent.READY event.


Implementação
    public function get ready():Boolean
setuppropriedade 
setup:Boolean  [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.

This flag is true when the ModuleManager dispatches the ModuleEvent.SETUP event.


Implementação
    public function get setup():Boolean
urlpropriedade 
url:String  [read-only]

The URL associated with this module (for exemplo, "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.


Implementação
    public function get url():String
Detalhes do método
load()método
public function load(applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null):void

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.

Parâmetros

applicationDomain:ApplicationDomain (default = null) — The current application domain in which your code is executing.
 
securityDomain:SecurityDomain (default = null) — The current security "sandbox".

publish()método 
public function publish(factory:IFlexModuleFactory):void

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.

Parâmetros

factory:IFlexModuleFactory — The class that implements the module's IFlexModuleFactory interface.

Veja também

release()método 
public function release():void

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.

Veja também

unload()método 
public function unload():void

Unloads the module. Flash Player will not fully unload and garbage collect this module if there are any outstanding references to definitions inside the module.

Detalhes do evento
error Evento
Event Object Type: mx.events.ModuleEvent
ModuleEvent.type property = mx.events.ModuleEvent.ERROR

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:

PropriedadeValor
bubblesfalse
bytesLoadedEmpty
bytesTotalEmpty
cancelablefalse
currentTargetThe Object that defines the event listener that handles the event. For exemplo, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
errorTextThe error message.
targetThe 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.
progress Evento  
Event Object Type: mx.events.ModuleEvent
ModuleEvent.type property = mx.events.ModuleEvent.PROGRESS

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:

PropriedadeValor
bubblesfalse
bytesLoadedThe number of bytes loaded.
bytesTotalThe total number of bytes to load.
cancelablefalse
currentTargetThe Object that defines the event listener that handles the event. For exemplo, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
errorTextEmpty
targetThe 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.
ready Evento  
Event Object Type: mx.events.ModuleEvent
ModuleEvent.type property = mx.events.ModuleEvent.READY

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:

PropriedadeValor
bubblesfalse
bytesLoadedThe number of bytes loaded.
bytesTotalThe total number of bytes to load.
cancelablefalse
currentTargetThe Object that defines the event listener that handles the event. For exemplo, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
errorTextEmpty
targetThe 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.
setup Evento  
Event Object Type: mx.events.ModuleEvent
ModuleEvent.type property = mx.events.ModuleEvent.SETUP

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:

PropriedadeValor
bubblesfalse
bytesLoadedEmpty
bytesTotalEmpty
cancelablefalse
currentTargetThe Object that defines the event listener that handles the event. For exemplo, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
errorTextAn error message.
targetThe 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.
unload Evento  
Event Object Type: mx.events.ModuleEvent
ModuleEvent.type property = mx.events.ModuleEvent.UNLOAD

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:

PropriedadeValor
bubblesfalse
bytesLoadedEmpty
bytesTotalEmpty
cancelablefalse
currentTargetThe Object that defines the event listener that handles the event. For exemplo, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
errorTextAn error message.
targetThe 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.