Installing Unbuntu (4): Getting Flexy
Thankyou, Adobe, for going Open Source with swf! Now, it took me a while to find out how to get the flex compiler working in Ubuntu, but it’s pretty easy when it comes down to it.
First, download the Flex SDK from www.adobe.com/products/flex/flexdownloads/
Unzip it somewhere. I put it in /home/ben/coding/flex
Now you need a makefile. Put this in your user folder (in my case /home/ben/) - it’s just a file with the name Makefile (the capital M is important), containing the following code:
MXMLC = coding/flex/bin/mxmlc
MFLAGS =.SUFFIXES: .as .swf
.as.swf:
$(MXMLC) $(MFLAGS) $<
firefox $@
To test it out, I made a file called hello.as in my /coding directory, containing the following:
package {
import flash.display.*;
import flash.text.*;
public class hello extends Sprite{
public function hello (){
var t:TextField = new TextField();
t.text = “Hello World!”;
t.width = 300;
t.height = 200;
t.x = 50;
t.y = 20;
addChild(t);
}
}
}
Then pulled up a terminal and typed:
make coding/hello.swf
This compiled the swf and launched it in firefox, as intended - w00t!
I learnt how to do it here: http://ntt.cc/2008/05/19/using-actionscript-3-to-develop-adobe-flash-content-on-linux.html
Tags: Installing Ubuntu
July 22nd, 2010 at 1:32 pm
Buy:Lumigan.Prednisolone.Mega Hoodia.Synthroid.Human Growth Hormone.100% Pure Okinawan Coral Calcium.Zyban.Prevacid.Arimidex.Valtrex.Retin-A.Nexium.Accutane.Petcam (Metacam) Oral Suspension.Actos.Zovirax….