Aptana HomePage

Getting started with Aptana and AFLAX

Introduction

This walkthrough will instruct you how to create a new AFLAX library project and get started with your coding using the documented AFLAX library supplied by Aptana.

  1. Access your projects.
    1. Click the Project tab to view your Aptana projects.
  2. Create a new AFLAX project.
    1. From the Aptana File menu, select New > Project...

      The New Project wizard opens.

    2. On the New Project wizard, expandAptana Projects and select Default Web Project.
    3. Click the Next button.
    4. In the Project name: field, type a name for your new project.
    5. Click the Next button.
    6. From the Select AjAX Libraries list, check the box next to AFLAX.
    7. On the Jaxer Support screen, click the Select All button if you would like to add Jaxer support to your project.
    8. Click the Next button.
    9. On the HTML Preview Settings screen, define any custom preview settings that you might need for your project.
    10. Click the Next button.
    11. Click the Finish button.

      Aptana creates a new AFLAX project, which includes a lib folder for the AFLAX library, a new AFLAX-linked HTML template file named aflax_sample.htm, and a new Code Assist Profile.

      The aflax_sample.htm file automatically opens in the HTML Editor. Because aflax_sample.htm is now the active file, your AFLAX profile now becomes the active Profile in the Code Assist Profiles View.

  3. Explore the AFLAX project.
    1. Just below the open aflax_sample.htm file in the Editor, click the Preview tab.

      Aptana displays a preview of a Drawing Demo from AFLAX.

      Note: If you are using a Mac, your embedded browser on the Preview tab will be Safari; however, Safari in embedded mode will not show embedded objects, such as Flash objects. To view the demo on a Mac, click the Run button Image:iconRun.png.

    2. Click the Source tab to return to the source view of aflax_sample.htm.
    3. In the Project View, expand your project folder to view the files in your AFLAX project.
    4. In the Code Assist Profiles View, expand the aflax_sample.htm project folder to view the documented AFLAX library files.

      These are the files that will be available to you in Code Assist.

  4. Preview Code Assist.
    1. In your AFLAX project, double-click the aflax_sample.js file to open the file in the Editor and view the code for this example.
    2. In the aflax_sample.js file, wait a few seconds for Code Assist to load, and near the top of the file, hover your cursor over AFLAX or AFLAX.MovieClip objects to view the documentation for these AFLAX objects.
    3. Insert your cursor somewhere on a new line in the aflax_sample.js file, type "af" and press ctrl+space.

      Code Assist displays a list of AFLAX functions that begin with the letters "af" (e.g. AFLAX, aflaxGetStaticProperty, etc). Use Code Assist to help you code.

  5. Start coding.
    1. As you type, notice that Code Assist is now active for the AFLAX objects and functions that you use.
    2. Press ctrl+space at any time to activate Code Assist.