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.
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!
January 29th, 2009 at 2:38 pm
thank you very much!
January 31st, 2009 at 9:14 am
Thanks for the tutorial…
I’ve managed to compile my first flex apps
cheers!
February 21st, 2009 at 5:13 am
Note the typo in step (4), that should read:
sudo cp -r flex_sdk_3 /Developer/SDKs/
i.e. there should not be any trailing slash on flex_sdk_3 (as this would not create the root folder, but copies all content below at the SDKs/* level.
An adidtional issue is the file permissions, that seemed to restrict all access to the owner i.e. root in this case. Not sure if it is a download issue, the auto unzip performed, etc. A hacky workaround to get going is to do:
sudo chmod -R ugo+rx flex_sdk_3
that will make all files readable/executable for all…