Packageefnx.general
Classpublic class Component

The Component class handles loading external component swfs and answers requests for component instantiation. Before a request for a component can be fulfilled the swf containing said components must be fully loaded. After loading the swf with the load(path) method, Component will dispatch a "complete" event.



Public Properties
 PropertyDefined by
  loaded : Boolean
[static][read-only] Returns whether or not the component swf has loaded.
Component
  testing : Boolean = false
[static] Indicates whether or not to display verbose information.
Component
Public Methods
 MethodDefined by
  
Component
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[static] Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
Component
  
load(path:*):void
[static] Used to load the swf that contains your components.
Component
  
New(component:String):*
[static] Returns an instance of the given class.
Component
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[static] Removes a listener from the EventDispatcher object.
Component
Events
 EventSummaryDefined by
   A complete event is dispatched after the assets swf is loaded.Component
Property detail
loadedproperty
loaded:Boolean  [read-only]

Returns whether or not the component swf has loaded.

Implementation
    public static function get loaded():Boolean
testingproperty 
public static var testing:Boolean = false

Indicates whether or not to display verbose information.

Constructor detail
Component()constructor
public function Component()

Method detail
addEventListener()method
public static function 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.

Parameters
type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)
load()method 
public static function load(path:*):void

Used to load the swf that contains your components.

Parameters
path:* — Path to the swf to load or a ByteArray containing the embedded swf asset.
New()method 
public static function New(component:String):*

Returns an instance of the given class.

Parameters
component:String

Returns
*
removeEventListener()method 
public static function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Removes a listener from the EventDispatcher object. If there is no matching listener registered with the EventDispatcher object, a call to this method has no effect.

Parameters
type:String
 
listener:Function
 
useCapture:Boolean (default = false)
Event detail
completeevent 
Event object type: flash.events.Event

A complete event is dispatched after the assets swf is loaded.