Apache Flex is an open source application framework curated by the Apache Foundation. It provides an environment where you can build SWF applications that can then executed on any Flash runtime or compiled with Adobe Air to execute natively on mobile environments (Android, iOS, BlackBerry) and desktop environments like Windows and OSX.
A Flex application consists of two components: MXML layout files describing the UI and ActionScript3 code to provide the functionality. These two types of files are compiled into a single SWF for deployment.
Flex applications can access all major application servers (Java, PHP, Ruby, .NET, etc.) through REST, SOAP, JSON, JMS and AMF.
The Apache Flex SDK comes large set of skinnable user-interface components with a full component lifecycle, a set of services (HTTPService, WebService, RemoteObject) and a set of Managers for things like Styling, Skinning, Layout, Localization, etc.
Flex also has accessibility support and an Automation-Testing Framework.
Apache Flex is a completely open-source project and uses the Apache License v. 2.0. This allows you to use the SDK and any outputs of the SDK for personal and commercial use with virtually no restrictions.
A typical use is to build a rich, interactive browser-based front end to a web application whose backend would be Java or .NET and connecting to data services through that application server.
Apache Flex and Apache are trademarks of The Apache Software Foundation.
|Apache Flex SDK 4.15||2016-01-11|
|Apache Flex SDK 4.14.1||2015-03-31|
|Apache Flex SDK 4.14.0||2015-02-03|
|Apache Flex SDK 4.13.0||2014-07-28|
|Apache Flex SDK 4.12.1||2014-05-03|
|Apache Flex SDK 4.12.0||2014-03-10|
|Apache Flex SDK 4.11.0||2013-10-28|
|Apache Flex SDK 4.10.0||2013-08-06|
|Apache Flex SDK 4.9.0||2013-02-28|
There are two ways to setup the Apache Flex SDK. You can use the provided Apache Flex SDK Installer, an Adobe AIR application that automates the process (on Windows or OS X/macOS). Or you can install it manually which obviously requires a greater comfort with your platform but provides more flexibility with the installation details.
NOTE: This can be a lengthy and involved process.
/ApacheFlex /ApacheFlex/dependencies /ApacheFlex/source
git clone https://git-wip-us.apache.org/repos/asf/flex-sdk.git flex-sdk
git clone https://git-wip-us.apache.org/repos/asf/flex-tlf.git flex-tlf
git checkout develop
For the build scripts to work you need to set the Environment Variables. The environment properties file contains the environment variables which point to the locations of the dependencies you will use throughout the process. These are used by the various build scripts to run and compile the SDK. You will add additional environment variables through out the rest of this tutorial. When you run the build script later the script will validate the paths provided and warn you if they are incorrect.
flex-sdk directory create a copy of the
env-template.properties file and name it
Since you've already installed Java and Ant, set the path of those by appending the following at the end of the
where the final directory name refers to the version of the AIR SDK you downloaded.
AIR_HOMEenvironment variable to the AIR SDK path you chose in the previous step. For example,
/ApacheFlex/dependencies/playerdirectory. Note: on OSX, append '.app/Contents/MacOS/Flash Player Debugger' to the path to the Flash Player.
/ApacheFlex/dependencies/player/Flash Player.app/Contents/MacOS/Flash Player Debugger
FLASHPLAYER_DEBUGGERenvironment variable to the installation path of the projector.
env.FLASHPLAYER_DEBUGGER=/ApacheFlex/dependencies/player/Flash Player.app/Contents/MacOS/Flash Player Debugger
You may also be able to use the Flash Player Plug-in. It is usually located here: /Library/Internet Plug-ins/Flash Player/ The full path would be: /Library/Internet Plug-ins/Flash Player.app/Contents/MacOS/Flash Player Debugger
where the number corresponds to the version you download.
PLAYERGLOBAL_HOMEenvironment variable to:
PIXELBENDER_HOMEenvironment variable to the installation directory.
For testing, the Adobe Flash Player's
mm.cfg file must have the proper properties set and a
FlashPlayerTrust file must allow local SWFs to access local files.
mm.cfgfile in an editor. The location of the
mm.cfgfile depends on your operating system. See this page.
mm.cfgat that time.
#Path to Apache Flex Source /ApacheFlex/source
# Flash player version for which player global swc to use playerglobal.version = 12.0 # AIR version number air.version = 4.0
These values are used in building the path to the SDK. So if you saved the playerglobal.swc to the following directory: /ApacheFlex/dependencies/PlayerGlobal/player/12.0 the value of the playerglobal.version would be 12.0.
Note: Since this value builds the path be sure to use the full value, 12.0, instead of 12 if your path contains it.
Note: If you are using a new version of the Flash Player that is not yet mentioned in the version of the Flex SDK you are working with you may get the message: Error: configuration variable 'swf-version' value contains unknown token 'playerglobal.swfversion' You'll need to update the
/ApacheFlex/source/flex-sdk/frameworks/build.xmlfile with an updated version check code.
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <s:Label text="Hello World!" /> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <s:Label text="Hello World!" /> </s:WindowedApplication>