Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
Application

Package | org.apache.flex.createjs
Class | public class Application
Inheritance | Application Application ApplicationBase 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
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | beads : Array The array property that is used to add additional beads to an MXML tag. | Application
|  | controller : Object The controller. | Application
|  | initialView : IApplicationView The initial view. | Application
|  | model : Object The data model (for the initial view). | Application
|  | MXMLDescriptor : Array [read-only] An array of data that describes the MXML attributes and tags in an MXML document. | Application
|  | numElements : int [read-only] The number of elements in the parent. | Application
|  | valuesImpl : IValuesImpl [write-only] The org.apache.flex.core.IValuesImpl that will determine the default values and other values for the application. | Application

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | addBead(bead:IBead):void Add a bead to the strand. | Application
|  | addElement(c:Object, dispatchEvent:Boolean = true):void Add a component to the parent. | Application
|  | addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void Add a component to the parent. | Application
|  | 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
|  | getBeadByType(classOrInterface:Class):IBead Find a bead on the strand. | Application
|  | getElementAt(index:int):Object Get a component from the parent. | Application
|  | getElementIndex(c:Object):int Gets the index of this subcomponent. | Application
|  | info():Object An Object containing information generated by the compiler that is useful at startup time. | ApplicationBase
|  | removeBead(value:IBead):IBead Remove a bead from the strand. | Application
|  | removeElement(c:Object, dispatchEvent:Boolean = true):void Remove a component from the parent. | Application

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | initialize():void This method gets called when all preinitialize handlers no longer call preventDefault(); | Application

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | applicationComplete | Dispatched at startup after the initial view has been put on the display list. | Application
|  | initialize | Dispatched at startup. | Application
|  | preinitialize | Dispatched at startup before the instances get created. | Application
|  | viewChanged | 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.

Mon Sep 5 2016, 07:19 AM -07:00