Packageorg.apache.flex.createjs
Classpublic class Application
InheritanceApplication Inheritance Application Inheritance ApplicationBase Inheritance flash.display.Sprite

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The Application class is the main class and entry point for a FlexJS application. This Application class is different than the Flex SDK's mx:Application or spark:Application in that it does not contain user interface elements. Those UI elements go in the views (ViewBase). This Application class expects there to be a main model, a controller, and an initial view. This is the CreateJS Application class which must be used in place of the normal FlexJS Application. CreateJS uses the HTML5 <canvas>, rather than the HTML DOM. This class sets up the canvas and injects the necessary HTML elements into the index.html file to bootstrap CreateJS.

See also

ViewBase


Public Properties
 PropertyDefined By
 Inheritedbeads : Array
The array property that is used to add additional beads to an MXML tag.
Application
 Inheritedcontroller : Object
The controller.
Application
 InheritedinitialView : IApplicationView
The initial view.
Application
 Inheritedmodel : Object
The data model (for the initial view).
Application
 InheritedMXMLDescriptor : Array
[read-only] An array of data that describes the MXML attributes and tags in an MXML document.
Application
 InheritednumElements : int
[read-only] The number of elements in the parent.
Application
 InheritedvaluesImpl : IValuesImpl
[write-only] The org.apache.flex.core.IValuesImpl that will determine the default values and other values for the application.
Application
Public Methods
 MethodDefined By
 Inherited
addBead(bead:IBead):void
Add a bead to the strand.
Application
 Inherited
addElement(c:Object, dispatchEvent:Boolean = true):void
Add a component to the parent.
Application
 Inherited
addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
Add a component to the parent.
Application
 Inherited
generateMXMLAttributes(data:Array):void
An method called by the compiler's generated code to kick off the setting of MXML attribute values and instantiation of child tags.
Application
 Inherited
getBeadByType(classOrInterface:Class):IBead
Find a bead on the strand.
Application
 Inherited
getElementAt(index:int):Object
Get a component from the parent.
Application
 Inherited
getElementIndex(c:Object):int
Gets the index of this subcomponent.
Application
 Inherited
info():Object
An Object containing information generated by the compiler that is useful at startup time.
ApplicationBase
 Inherited
Remove a bead from the strand.
Application
 Inherited
removeElement(c:Object, dispatchEvent:Boolean = true):void
Remove a component from the parent.
Application
Protected Methods
 MethodDefined By
 Inherited
initialize():void
This method gets called when all preinitialize handlers no longer call preventDefault();
Application
Events
 Event Summary Defined By
  Dispatched at startup after the initial view has been put on the display list.Application
  Dispatched at startup.Application
  Dispatched at startup before the instances get created.Application
  Dispatched at startup after the initial view has been put on the display list.Application
Event Detail
applicationComplete Event
Event Object Type: org.apache.flex.events.Event

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Dispatched at startup after the initial view has been put on the display list.

initialize Event  
Event Object Type: org.apache.flex.events.Event

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Dispatched at startup. Attributes and sub-instances of the MXML document have been created and assigned. The component lifecycle is different than the Flex SDK. There is no creationComplete event.

preinitialize Event  
Event Object Type: org.apache.flex.events.Event

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Dispatched at startup before the instances get created. Beads can call preventDefault and defer initialization. This event will be dispatched on every frame until no listeners call preventDefault(), then the initialize() method will be called.

viewChanged Event  
Event Object Type: org.apache.flex.events.Event

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Dispatched at startup after the initial view has been put on the display list. This event is sent before applicationComplete is dispatched.