This is a quickstart guide for installing the OSX Flex SDK on your Mac. I adapted this from a video tutorial at learnhub. If you prefer to watch videos, go check it out. This is just a more straight forward guide to getting you up and running.
1. Download the SDK from http://www.adobe.com/products/flex/flexdownloads/
(click on the "I have read the Adobe Flex 3 SDK License" checkbox, and the download link will appear below)
2. Use stuffit expander / unzip to uncompress the archive.
3. Open the terminal (if not open already), and go to the folder where you uncompressed the archive to.
4. Type the following:
sudo cp -r flex_sdk_3 /Developer/SDKs/
5. Edit your ~/.bash_login to include the following line:
export PATH="/Developer/SDKs/flex_sdk_3/bin:$PATH"/
This will add the binaries to the path. If this file doesn't exist yet, go ahead and create one. Next, create a new terminal window to have the right binaries in your path.
6. Try it out. Create a file named "helloworld.mxml" and paste the following into it.
<?xml version="1.0"?> <!-- mxml\HellowWorld.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Panel title="My Application" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" > <mx:Label text="Hello World!" fontWeight="bold" fontSize="24"/> </mx:Panel> </mx:Application>
Make sure there is no whitespace before the XML declaration 7. Try it out. Go back to your terminal and type (from the directory where helloworld.mxml is) type the following:
mxmlc helloworld.mxml
This will compile the file using the Flex 3 SDK. It should create a file in the same directory called "helloworld.swf".
8. Open up helloworld.swf in Firefox. If you have Flash 9 installed, it will show you your compiled Flex application!