Version 6, last updated by judah at September 10, 2009 00:42 UTC
Creating a new Project
QUICK STEPS
- Create a new project using Flex SDK 3.4
- Change the Flash Player version to 10 or greater
- Add the flexcapacitor html-template to the source path ${DOCUMENTS}/flexcapacitor/html-template
- Add the flexcapacitor library project to the library path
Creating a New Project
In Flash Builder go to the File menu and select File > New > Flex Project. Enter the name of your project, for example, "Flash Website" and check "Web" as application type. So far this has only been tested with Flex 3.4. Change the SDK to 3.4. You can leave the other options at default. Click Finish.
Changing the Flash Player version
Go into the Project Properties again and select the Flex Compiler screen. Change the Flash Player version to at least 10.0.0 and click OK. Flash Player 10 is when the new Flash Player Text Engine was first introduced.
Add the Flex Capacitor Library
With the new project selected in the Package Explorer, navigate to the Project menu item and select Properties. In the Flex Build Path screen Source tab select Add Folder and enter "${DOCUMENTS}/flexcapacitor/html-template". Next select the Library Path tab. Click Add Project and select "flexcapacitor" and click OK and OK again.
Using the SWC
You can also just use the SWC instead of referencing the library project. However you will need to copy in the SWC and html-template files. And whenever you change the Flex SDK version or Flash Player version the html-template files get written over. So you then have to copy them again. Note: index.template files can be different between versions.
By default a library project automatically generates a SWC file that you can use in your project. A SWC is a file created by Flex that contains all or some of the classes in your library project. All the classes and assets you choose to include are compiled into one distributable file that you can add to any project. With this method you copy the SWC from the flexcapacitor library project bin folder and paste it into your project's libs folder.
The libs folder is a special folder setup by Flash Builder when you create a new Flex project. Any SWC's placed in this folder are automatically included in the build path. This means that components in the SWC show up in the Custom category in the Components Panel. This also means classes in the SWC show up in code hinting in the MXML editor.
Note: You can change what classes are included in the swc by going into the flexcapacitor library Project > Properties > Flex Library Build Path and choosing the classes you want to be included.