Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Building Astra Flex from Source

joshtynjala edited this page Nov 10, 2010 · 6 revisions

If you’ve made any changes to the Astra Flex source code, you should create your own SWC rather than using the source code directly with a Flex application. If you simply need a pre-build SWC, grab the most recent zip file from the Astra Flex Downloads. If you need a SWC compatible with Flex 3.5, you should download astra-flex-2010-1.zip. Future builds of Astra Flex will only target Flex 4.x and beyond.

Unlike previous releases of Astra Flex, there is a defaults.css file in the project. Including this file in a SWC is Adobe’s recommended method for applying default style values to Flex components. MXMLC will automatically discover and use defaults.css from a SWC, but it does not do the same with raw source code. You need to build a SWC if you intend to simply drop it into your project’s build path with no extra setup.

Build Script

You will find an Ant build script, named build.xml, at the root of the source tree along with two related files, sdk.properties and build.properties. sdk.properties defines file system paths for the Flex SDK used to build the SWC. build.properties defines project-specific variables, such as strings used in the build and non-SDK file system paths.

To customize the location of the Flex SDK on your computer, you will need to create a file named sdk.local.properties. There, you can override the property flexsdk.root.

To build the SWC, simply run ant from the command line at the root of the project tree. Ant should automatically find build.xml and run the default target. If you want to build documentation and examples too, run ant build-all instead.

Flex Library Project

Alternatively, you can create a Flex Library Project in Flash Builder. Be sure to include all of the classes from the source directory, and add defaults.css to the included assets.

Clone this wiki locally