Skip to end of metadata
Go to start of metadata

FlexJS Applications

This page is under construction

This page describes how to build a FlexJS Application.

Unlike Flex, the Application class in FlexJS is not a user-interface component. To build an application, you use the Application class (rather, your sub-class of it) to set up basic items and to load your first "view".

Your user interface is placed into views and they can, in theory, be switched. It is "theory" at the moment because it has not been tried, but that is the goal.

Application

Here is a typical Application:

A FlexJS application should have the follow parts:

  • initialView: This is the first UI component that will be loaded and presented.
  • valuesImpl: This property provides the mapping between objects and keys. FlexJS comes with a values mapper that uses CSS to associate classes with properties.

Your application will probably also have its own data model and even controller which you can also include.

MyInitialView

The view classes extend ViewBase and provides the space to display the user interface. In the example above, a Panel component is the only child of the view and the Panel contains an assortment of other components.

MyModel

 

MyController


Screenshot:

 

Once you have composed your application and initial view, you can build either a Flash SWF or generate JavaScript and an HTML index page.

  • In Flash Builder, the normal project build will generate the Flash SWF.
  • In Flash Builder, choose from the menus, Run->External Tools->FlexJS (FalconJX Debug and Release Build) to generate the JavaScript and HTML page.

Open the appropriate executable to run your FlexJS application.

  • No labels