com.asual.enflash.EnFlashObject +--com.asual.enflash.EnFlash
EnFlash is the main class that creates and manages applications based on the EnFlash Framework. It provides a quick access to any application object, tracing functionality, simplified Shared Objects management and other useful methods.
new EnFlash()
public ide:Boolean [Read Only]Indicates whether this application runs inside the Flash IDE or not.
public os:String [Read Only]Shortcut property that provides information about the Operating System where this application runs.
public mode:Boolean [Read Only]Initialization mode of this application.
public data:Composition [Read Only]Provides access to the data associated with this application.
public ui:UI [Read Only]Provides access to the User Interface object of this application.
public movieclip:MovieClip [Read Only]MovieClip that hosts this application.
public label:LabelLabel object that displays messages printed using the
debug()method of this application.
public function main(mc:MovieClip, mode:Boolean, theme:String):VoidInitializes the object and makes it a part of the EnFlash object hierarchy.
- Parameters
mc- Parent's Referencemode- Initialization mode of this application - XML (true) or API (false)theme- Path of a default theme that overrides the locally saved user preferences
public function loadXML(url:String):VoidLoads an XML initialization file for this application.
- Parameters
url- (optional) Path of an XML file. A default name is assumed when this parameter is not provided, ie.demo.xmlfor an application nameddemo.swf.
public function debug(msg:String):VoidDisplays program messages in a top-level Label instance.
Example:debug("myObject", myObject,...myObject.someProperty);
- Parameters
msg- One or multiple objects and values to be displayed.
public function register(object:Object):NumberRegisters an object with this application. This method is invoked automatically for every EnFlash object.
- Parameters
object- An object to be registered- Return
- Unique object reference used in EnFlash hierarchy
public function unregister(object:Object):VoidUnregisters an object from this application.
- Parameters
object- An object to be unregistered.
public function getByRef(ref:Number)Provides access to an EnFlash object based on a known reference number.
- Parameters
ref- Reference number of an object- Return
- Object reference
public function getById(id:String)Provides access to an EnFlash object based on a known object ID.
- Parameters
id- ID of an object- Return
- Object reference
public function setLocal(property:String, value:Object):VoidWrites a property/value record in the Shared Object of this application.
- Parameters
property- Name of a recordvalue- Value of a record
public function getLocal(property:String):ObjectReads a value of a property from the Shared Object of this application.
- Parameters
property- Name of a stored record- Return
- Value of a stored object
public function loaderCall(method:String, argument:Object):VoidProvides access to the functionality of the loader movie.
- Parameters
method- Name of the method that will be executedargument- (optional) Method argument