Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Setting Up the Flex 4 SDK With Eclipse IDE

Setting Up the Flex 4 SDK With Eclipse IDE

Ratings: (0)|Views: 296 |Likes:
Published by zzzz_al
Free method of developing and building Flash applications using the free Flex 4 SDK in combination with the open source Eclipse IDE. by Sean Smith (http://www.seanhsmith.com)
Free method of developing and building Flash applications using the free Flex 4 SDK in combination with the open source Eclipse IDE. by Sean Smith (http://www.seanhsmith.com)

More info:

Published by: zzzz_al on Aug 17, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/17/2011

pdf

text

original

 
Sean Smith
Flex for Free: Setting Up the Flex 4 SDK with Eclipse IDE
I recently wrote about Adobe’s release of Flash Builder 4, ColdFusion Builder and the free Flex 4 SDK. While Flex Builder is agreat IDE, as I’m sure are Flash Builder and ColdFusion Builder, most independent developers cannot afford the licenses that rangeinto the hundreds of dollars. What is an aspiring or shoe-string budget Flash developer to do? Fortunately, there is a legal and freemethod of developing and building Flash applications using the free Flex 4 SDK in combination with the open source Eclipse IDE.The first things you will need to do is grab the
Flex 4 SDK 
(http://www.adobe.com/go/flex4_sdk_download
 
)
and a version of the
Eclipse IDE
(http://www.eclipse.org/downloads/
 
)
. Any version of Eclipse should do but I recommend using either Classic or the onefor PHP Developers as I’m currently using. Install Eclipse to where ever you would like and extract the Flex 4 SDK files to anyeasily accessible folder. For the purposes of this tutorial, I extracted mine to the following path on my Windows Vista laptop:C:\AdobeSDK\Flex\4.0Open up Eclipse and start a new project by clicking File -> New -> Project. The “New Project” wizard should open. Select“Project” from the “General” group in the list and click the Next button.
(http://seanhsmith.com/wp-content/uploads/2010/03/01.jpg
 
)
For the purposes of this tutorial, we will call this project “Test Project.” Type this into the “Project name” field and either leave“Use default location” checked or uncheck it and specify your own workspace location. I will leave this checked. Click the Finish button.
(http://seanhsmith.com/wp-content/uploads/2010/03/02.jpg)
Eclipse should create your project and add it to your Project Explorer window pane. We will mirror the standard folder structurethat Flex Builder uses and create three new subfolders to our project called “bin,” “libs” and “src.” Right-click on your projectfolder, point to “New,” and then click on “New Folder.” Enter “bin” into the “Folder name” field and click the Finish button.Repeat this process twice more, entering the folder names “libs” and “src” each time. When you are finished, you should have threesubfolders below your root workspace location.http://www.seanhsmith.com/2010/03/29/flex-for-free-setting-up-the-flex-...1 of 68/17/2011 4:19 PM
 
(http://seanhsmith.com/wp-content/uploads/2010/03/03.jpg
 
)
The bin folder is where we will save the compiled Flash .swf file. The libs folder is where you will drop any .swc file libraries thatyour project will use. Lastly, the src folder is where all of your project source code will be stored. Before we continue, I recommendadding an editor for the *.as file extension in Eclipse and associating it with the Java editor since ActionScript 3 is very similar insyntax. To do this, click either “Window” from the menu if using Windows or from “Eclipse” if using a Macintosh and then click Preferences. This will bring up the Eclipse Preferences dialog window. Expand the “General” node in the tree and then expand“Editors.” Click on “File Assocations” to see the file associations pane. Once there, click the “Add…” button next to the “Filetypes” list.
(http://seanhsmith.com/wp-content/uploads/2010/03/04.jpg
 
)
Enter “*.as” in the “File type” field click the OK button. The file type should now be added to the “File types” list. Make sure thisnew item is selected by clicking on it.
(http://seanhsmith.com/wp-content/uploads/2010/03/05.jpg)
 Next, click the “Add…” button next to the “Associated editors” list, which should be empty. Make sure the “Internal editors”option is selected and then select “Java Editor” from the list. Click the OK button.http://www.seanhsmith.com/2010/03/29/flex-for-free-setting-up-the-flex-...2 of 68/17/2011 4:19 PM
 
(http://seanhsmith.com/wp-content/uploads/2010/03/06.jpg
 
)
The new associated editor should appear in the “Associated editors” field. Click the OK button to save and exit the EclipsePreferences window.
(http://seanhsmith.com/wp-content/uploads/2010/03/07.jpg
 
)
 Now we are going to create our MXML file that will define our application layout and appearance. It also serves as the “entry point” that the compiler uses when linking everything together. Right-click on the src folder, point to “New,” and then click “File.”The “New File” window should appear. For this tutorial, I will name the file application.mxml but this realistically can be whatever valid filename you want to give it.
(http://seanhsmith.com/wp-content/uploads/2010/03/08.jpg
 
)
The application.mxml file should now be in your src folder and the editor should automatically open. Since this is not a Flex tutorial,I will just provide a valid Flex 4 MXML skeleton that we will use to test the compiler. Enter the following into the application.mxmlhttp://www.seanhsmith.com/2010/03/29/flex-for-free-setting-up-the-flex-...3 of 68/17/2011 4:19 PM

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->