How to write AsctionScript program with linux-hello world
如何在linux环境下写一个简单的AsctionScript程序, 下面的例子是一个简单helloworld程序。
Env: Linux
Tools: Flex SDK
Step1:
DownloadFlex SDK and run the following command:
unzip flexsdk4.5.1.zip
Step2:
Add the path, vim ~/.bashrc, add following line:
export PATH=/home/zay/eggs/flexsdk4.5.1/bin:$PATH
Step3:
Run the command: bash and then vim linux.as:
1 package{
2 import flash.display.;
3 import flash.text.;
4 public class linux extends Sprite{
5 public function linux(){
6 var t:TextField = new TextField();
7 t.text = 'Hello world';
8 addChild(t);
9 }
10 }
11 }
Step4:
Run the command : mxmlc linux.as
Step5:
firefox linux.swf
由于flex sdk是跨平台了并不需要安装别的什么包,一个简单的Hello world程序就完成了,是不是感觉很简单。