패키지 | mx.modules |
인터페이스 | public interface IModuleInfo extends IEventDispatcher |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
속성 | 정의 주체 | ||
---|---|---|---|
data : Object
User data that can be associated with the singleton IModuleInfo
for a given URL. | IModuleInfo | ||
error : Boolean [읽기 전용]
A flag that is true if there was an error
during module loading. | IModuleInfo | ||
factory : IFlexModuleFactory [읽기 전용]
The IFlexModuleFactory implementation defined in the module. | IModuleInfo | ||
loaded : Boolean [읽기 전용]
A flag that is true if the load()
method has been called on this module. | IModuleInfo | ||
ready : Boolean [읽기 전용]
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 [읽기 전용]
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 [읽기 전용]
The URL associated with this module (for example, "MyImageModule.swf" or
"http://somedomain.com/modules/MyImageModule.swf". | IModuleInfo |
메서드 | 정의 주체 | ||
---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | IEventDispatcher | ||
이벤트를 이벤트 흐름으로 전달합니다. | IEventDispatcher | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | IEventDispatcher | ||
load(applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null, bytes:ByteArray = null, moduleFactory:IFlexModuleFactory = null):void
Requests that the module be loaded. | IModuleInfo | ||
Publishes an interface to the ModuleManager. | IModuleInfo | ||
Releases the current reference to the module. | IModuleInfo | ||
EventDispatcher 객체에서 리스너를 제거합니다. | IEventDispatcher | ||
Unloads the module. | IModuleInfo | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | IEventDispatcher |
이벤트 | 요약 | 정의 주체 | ||
---|---|---|---|---|
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 |
data | 속성 |
error | 속성 |
factory | 속성 |
factory:IFlexModuleFactory
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
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.
구현
public function get factory():IFlexModuleFactory
loaded | 속성 |
ready | 속성 |
ready:Boolean
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get ready():Boolean
setup | 속성 |
setup:Boolean
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get setup():Boolean
url | 속성 |
url:String
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get url():String
load | () | 메서드 |
public function load(applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null, bytes:ByteArray = null, moduleFactory:IFlexModuleFactory = null):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
매개 변수
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.
|
publish | () | 메서드 |
public function publish(factory:IFlexModuleFactory):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
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.
매개 변수
factory:IFlexModuleFactory — The class that implements the module's IFlexModuleFactory interface.
|
관련 API 요소
release | () | 메서드 |
public function release():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
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.
관련 API 요소
unload | () | 메서드 |
public function unload():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
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.
error | 이벤트 |
mx.events.ModuleEvent
속성 ModuleEvent.type =
mx.events.ModuleEvent.ERROR
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Dispatched by the backing ModuleInfo if there was an error during module loading.
Dispatched when there is an error downloading the module. TheModuleEvent.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. |
progress | 이벤트 |
mx.events.ModuleEvent
속성 ModuleEvent.type =
mx.events.ModuleEvent.PROGRESS
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
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. TheModuleEvent.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. |
ready | 이벤트 |
mx.events.ModuleEvent
속성 ModuleEvent.type =
mx.events.ModuleEvent.READY
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Dispatched by the backing ModuleInfo once the module is sufficiently
loaded to call the IModuleInfo.factory()
method and the
IFlexModuleFactory.create()
method.
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. |
setup | 이벤트 |
mx.events.ModuleEvent
속성 ModuleEvent.type =
mx.events.ModuleEvent.SETUP
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Dispatched by the backing ModuleInfo once the module is sufficiently
loaded to call the IModuleInfo.factory()
method and
the IFlexModuleFactory.info()
method.
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. |
unload | 이벤트 |
mx.events.ModuleEvent
속성 ModuleEvent.type =
mx.events.ModuleEvent.UNLOAD
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Dispatched by the backing ModuleInfo when the module data is unloaded.
Dispatched when the module is unloaded. TheModuleEvent.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. |
Tue Jun 12 2018, 03:17 PM Z