Tutorial for use Action Script 3 on Linux
For this part, you will download eclipse IDE, Adobe Flex SDK for having a tools for compile, FDT plugin for eclipse.
Eclipse is free to use and it’s about 100 Mo on your drive.
Flex SDK is free but for download it, you not must have an account at Adobe website.
FDT cost between 100 € and 600 € varying type of license. So if you are an open source developer or student, special offers are purposed for you.
Finally when all applications will work, you’ll invite LowRA to join us. And she’ll do it.
Eclipse Night Fever
First we will download an eclipse for our website. Why we not use included eclipse from the Linux distribution ? That’s because you have not all admins rights for maintain Eclipse. For example, register’s code of FDT will not correctly save with the standard installation (with apt-get or other).
At eclipse download page you can choose the most lite version Eclipse IDE for Java Developers.
Place the archive at your
~/bin/
and type (don’t forget to adapt the archive name)
tar -xvzf eclipse-java-europa-fall2-linux-gtk.tar.gz
.
Now you must check to documentation of your Linux distribution for how to use the Sun Java Virtual Machine. For Debian and Ubuntu systems there’s a Free Java Virtual Machine by default and Eclipse run better with the Sun JVM.
Well done, eclipse night can begins.
Flex: ON
If you come from Action Script 2 programming, you have probably used the exelent compiler MTASC developed by Nicolas Cannasse from Motion Twin French companies.
For compile Action Script 3, Adobe puporse a free SDK named FLex. With it you can realize some task around Action Script 3 :
- Compile standard SWF of course,
- Compile an application with mxml concept (see Adobe documentation)
- Generate html documentation with ASDoc
Nice, isn’t it ?
Let’s go to download Flex 2 SDK from Flex homepage. Choose Download the free Flex 2 SDK, including the Flex framework at bottom. At Flex SDK 2.0.1 with HotFix 1 part, check the box. Finally choose the Download the Flex SDK 2.0.1 with HotFix 1 for all Platforms.
After download, move the zip file to
~/lib/flex/
and type
unzip flex2_sdk_hf1.zip
You can now find something like that :
$ ls additional-legal-notices.htm frameworks readme_hotfix1_159086.htm asdoc lib readme.htm bin license.htm resources flex2_sdk_hf1.zip player samples
- bin contains compilers for all system
- libs contains some jar used by compilers
- framework is directory which have configurations and standard swc
- asdoc is the same as libs but just for asdoc generator
- player is wonderful directory with flash players for Windows and Mac systems... Linux, no ? No. 4d0b3 fuck3r !
- samples and ressources aren’t important for us
Now we will extend Flex SDK installation by including flash players, standard and debugger versions.
For this rendez-vous on flash player standalone download page and select Download the Linux debugger and standalone players.
For this archive, we extract only two files.
- flash_player_9_linux_dev.tar.gz/flash_player_9_linux_dev/standalone/release/flashplayer.tar.gz extract it to anywhere and move contained flashplayer to ~/bin/flashplayer
- flash_player_9_linux_dev.tar.gz/flash_player_9_linux_dev/standalone/debugger/flashplayer.tar.gz extract it to anywhere and move contained flashplayer to ~/bin/flashplayerdebug
You can check the installation :
you@computer:~/bin$ ls -l total 96844 drwxr-xr-x 7 you you 4096 2008-02-13 09:42 eclipse -rw-r--r-- 1 you you 82436827 2008-02-12 20:21 eclipse-java-europa-fall2-linux-gtk.tar.gz -rwxr-xr-x 1 you you 7980068 2007-12-01 03:12 flashplayer -rwxr-xr-x 1 you you 8622772 2007-12-01 03:46 flashplayerdebug
If it’s ok, you can take a whiskey glass or a coffee depending time of day.
FDT
Installing FDT is very easy, we will use standard plugin installation method of Eclipse. First run our fresh eclipse
~/bin/eclipse$ ./eclpise
And we follow instruction like it explain on FDT installation page.
- Choose “Help”→“Software Updates”→“Find and install...”.
- Select “Search for new features to install” and choose “Next”.
- Choose “New Remote Site”. Insert “FDT” as name and the URL “http://fdt.powerflasher.com/update“.
- Confirm with “OK”. Select “FDT” and choose “Finish”.
- Choose Basic or Professional and press “Next”.
Wait, click OK, Next or Finish when you must until Eclipse need to restart. Do it.
If it’s your first time with eclipse, close Welcome’s tab. Choose FDT perspective by “Window > Open Perspective > Other” and select “Flash FDT”.
Probably you have a warning message about memory. To repair it, we need to close eclipse and edit eclipse confiration file: eclipse.ini into our eclipse directory contains. Just add -Xmx512m at the last line and save it.
Certainly FDT want to enter a product key. So you can try FDT for 30 days or buy it.
Hi Laura, can you come on ?
For develop with LowRA, we need to get it by SVN method. In most of case, you need to install subversion package with
urpmi subversion # for fedora or mandriva user apt-get install subversion # debian or ubuntu userWhen it’s done. We go devel directory and we’ll get LowRA from SVN like google suggest to us.
$ cd ~/devel/ ~/devel$ svn checkout http://lowra.googlecode.com/svn/trunk/ lowra-read-onlyA lot of defile in your terminal. It’s lordly LowRA. We took a glance at lowra-read-only directory.
- bin: lowra as swc file
- build: ant tasks for compile lowra
- docsIncludes: some documentations about lowra
- src: source code
- test: unit tests
- testBin: where are compile tests
- testRunner: files to run tests
- tools: annexes files, for now only the dtd of applicationContext
Invite LowRA to diner under Eclipse
We need to prepare FDT by Eclipse’s Window > Preferences... menu. When it’s done, select FDT > Core Libraries. At right select AS3 Core Libraries.
We must declare here Flex 2 SDK, LowRA and every libraries you’ll need at future. So romantic, no ?
Flex 2 SDK
Click to Add.... Into Core Library window:
- Type: Flex 2 SDK
- Name: Core Flex 2
- Path Variable: click to Browse...
Into Linked Libraries window click to New....
Into Edit Variable window:
- Name: CORE_FLEX_2
- Location: enter complete path to your ~/lib/flex (or use Folder button)
Validate... That’s first step. Now do the same with LowRA.
LowRA
Make sure you are at Preferences window and AS3 Core Libraries tab. Click to Add.... Into Core Library window:
- Type: Pure AS3 (Flex 3)
- Name: AS3 SWC LOWRA
- Path Variable: click to Browse...
Into Linked Libraries window click to New....
Into Edit Variable window:
- Name: AS3_SWC_LOWRA
- Location: enter complete path to your ~/devel/lowra-read-only/bin/Lowra.swc (or use File button)
Validate until close Preferences window.
The End at One-Eyed-Jack
For be sure all is good, no better than create our first Flex 2 project. Locate the Flash Explorer part. If you not see it, make sure you are on FDT view : Window > Open Perspective > Other... and select Flash FDT.
At Flash Explorer section:
- right click New > New Flash Project
- Give it a name LowRAProject1.
- Check Action Script 3 and Core Flex 2
- Next
- Add Linked Library
- Add...
- select AS3_SWC_LOWRA
- OK, Finish, Finish
Now you need to fix a little bug with Eclipse. For that click right on LowRAProjet1 in Flash Explorer window and select Properties.
Now in Ressources, locate New text file line delimiter and choose Unix from Other list.
If all is well, you can browse swc files.
Congratulation, you can now invite LowRA to your future projects.
projects/lowra/tutorialsgetstartedlinux.txt · Last modified: 2008/02/20 01:11 by mickro