Monday, October 25, 2010

Setting up Flex on Eclipse for Linux

Flash development on Linux is done with Flex SDK. Some nice people started at FB4LINUX have provided a GUI to develop Flash on Linux and this can be integrated into Eclipse IDE.

By the time I wrote this rticle, Adobe placed a notice that they will no longer continue with the Flex Builder development. This means that you can only use command lines to work on Flex. I guess this will affect FB4LINUX.

I refer to a number of sites before starting the installation and found one worth mentioning here. Matthew wrote with clarity and did cover what most other instructions provided and maybe a bit more.

Pre-installation checks: Have you installed Eclipse 3.5+ and Java Development Kit 1.5+

Step 1. Download the fb4linux files in 4 parts from http://code.google.com/p/fb4linux/downloads/list
  • FB4Linuxaa
  • FB4Linuxab
  • FB4Linuxac
  • FB4Linuxad
Merge them together into a BZIP2 format and extract using the command prompt at the terminal. At the folder where you downloaded the 4 files, just type

cat FB4Linux* >FB4Linux.tar.bz2
bunzip2 FB4Linux.tar.bz2
tar -xvf FB4Linux.tar

I renamed the folder to Adobe_Flash_Builder4 since I did not want spaces between the folder name.

Step 2. Download the eclipse plugin for FB4Linux from http://www.brighthub.com/hubfolio/matthew-casperson/media/p/78806.aspx

Unzip the file ecplise and copy the plugins to /usr/lib/eclipse/plugins

The plugins are;
com.adobe.coldfusion.rds.client_1.0.266425.jar
javax.wsdl_1.6.2.v200806030405.jar
org.apache.commons.lang_2.3.0.v200803061910.jar
org.apache.xerces_2.8.0.v200803070308.jar
org.apache.xml.resolver_1.1.0.v200806030311.jar

Step 3. Start Eclipse and apply the plugins.

In Eclipse select Window->Preferences->General->Capabilities and make sure that the Classic Update option is checked.
Click Help->Software Updates->New Feature to Install.
Click the New Local Site button, and type in the location where you extracted FB4Linux in step 1 (you will need to specify the eclipse subdirectory to be specific).
With the Adobe Flash Builder 4 site selected, click the Finish button. You will be asked which features to install. Tick the Adobe Flash Builder 4 feature and click Next.
Accept the terms and click the Next button and click Finish button.

Restart Eclipse.

Step 4: Install the Flex SDK from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4
Download and extract a copy of the Flex SDK from Adobe into a folder flex4.1.0

Set Eclipse to use the Flex SDK by right clicking on your Flash project and selecting Properties. Select the ActionScript Compiler option.
Click the Add button to add the location of the Flex SDK you have extracted.
Click on the Run toolbar menu item and select the External Tools Configuration option.

Right click on the Program option and select the New option. Then fill out the Location and Arguments settings to point to your Flash standalone player and SWF file respectively.

Done...next to look for more flash tutorials.

3 comments:

Prakash said...

Hi.. First of all thank you for ur post.. I configured flex builder eclipse plugin in linux and I can able to create flex projects. Now problem is I cant able to run my flex project which opens blank browser page. It would be helpful if u explain ur final step more elaborately. Also where can i find standalone Adobe flash player for ubuntu.

Tboxmy said...

Prakash,

Try to trace back your steps. I dont get a blank page.

Ubuntu stand alone flash players is gnash.

Tboxmy said...

There is an update to this doc, hope it helps. See http://tboxmy.blogspot.com/2011/03/flex-4-on-eclipse-galileo-for-linux.html