Class com.asual.enflash.EnFlash

com.asual.enflash.EnFlashObject
   +--com.asual.enflash.EnFlash

Description

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.

Field Index

data, ide, label, mode, movieclip, os, ui
Inherited from EnFlashObject
id, oninit, onremove, parent, ref

Method Index

new EnFlash()

debug(), getById(), getByRef(), getLocal(), loaderCall(), loadXML(), main(), register(), setLocal(), unregister()
Inherited from EnFlashObject
addEventListener(), createDelegate(), dispatchEvent(), dispatchEventOnce(), getListeners(), getXML(), remove(), removeDelegate(), removeEventListener(), setXML(), toString()

Constructor Detail

EnFlash

public function EnFlash(id:String)
Parameters
id - (optional) Descriptive ID of this object.

Field Detail

ide

public ide:Boolean [Read Only]

Indicates whether this application runs inside the Flash IDE or not.


os

public os:String [Read Only]

Shortcut property that provides information about the Operating System where this application runs.


mode

public mode:Boolean [Read Only]

Initialization mode of this application.


data

public data:Composition [Read Only]

Provides access to the data associated with this application.


ui

public ui:UI [Read Only]

Provides access to the User Interface object of this application.


movieclip

public movieclip:MovieClip [Read Only]

MovieClip that hosts this application.


label

public label:Label

Label object that displays messages printed using the debug() method of this application.

Method Detail

main

public function main(mc:MovieClip, mode:Boolean, theme:String):Void
Initializes the object and makes it a part of the EnFlash object hierarchy.
Parameters
mc - Parent's Reference
mode - Initialization mode of this application - XML (true) or API (false)
theme - Path of a default theme that overrides the locally saved user preferences

loadXML

public function loadXML(url:String):Void
Loads 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.xml for an application named demo.swf.

debug

public function debug(msg:String):Void
Displays 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.

register

public function register(object:Object):Number
Registers 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

unregister

public function unregister(object:Object):Void
Unregisters an object from this application.
Parameters
object - An object to be unregistered.

getByRef

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

getById

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

setLocal

public function setLocal(property:String, value:Object):Void
Writes a property/value record in the Shared Object of this application.
Parameters
property - Name of a record
value - Value of a record

getLocal

public function getLocal(property:String):Object
Reads 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

loaderCall

public function loaderCall(method:String, argument:Object):Void
Provides access to the functionality of the loader movie.
Parameters
method - Name of the method that will be executed
argument - (optional) Method argument