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.
- Access your projects.
- Click the Project tab to view your Aptana projects.
- Create a new AFLAX project.
- From the Aptana File menu, select New > Project...
The New Project wizard opens.
- On the New Project wizard, expandAptana Projects and select Default Web Project.
- Click the Next button.
- In the Project name: field, type a name for your new project.
- Click the Next button.
- From the Select AjAX Libraries list, check the box next to AFLAX.
- On the Jaxer Support screen, click the Select All button if you would like to add Jaxer support to your project.
- Click the Next button.
- On the HTML Preview Settings screen, define any custom preview settings that you might need for your project.
- Click the Next button.
- 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.
- From the Aptana File menu, select New > Project...
- Explore the AFLAX project.
- 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 .
- Click the Source tab to return to the source view of aflax_sample.htm.
- In the Project View, expand your project folder to view the files in your AFLAX project.
- 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.
- Just below the open aflax_sample.htm file in the Editor, click the Preview tab.
- Preview Code Assist.
- 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.
- 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.
- 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.
- Start coding.
- As you type, notice that Code Assist is now active for the AFLAX objects and functions that you use.
- Press ctrl+space at any time to activate Code Assist.