BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / flash / #39237同步于 2008/11/17
Flash机器人发帖

Using Actionscript 3 to develop Adobe Flash Content On Linu

dickfu
2008/11/17镜像同步0 回复
1, Preparation and Requirement Install Adobe FLEX 3.0 SDK Download the Adobe FLEX 3.0 SDK from http://www.adobe.com/go/flex3_sdk Choose “I have read the Adobe Flex 3.0 SDK License, and by downloading the software listed below I agree to the terms of the agreement.” Then click ” Download the Flex 3.0 SDK for all Platforms.” Install after download to local. For example under the /tmp/flex: $ cd /tmp/flex $ unzip flex_sdk_3.zip Then you will find SDK files under /tmp/flex/bin Install JDK Generally when Linux installed, the JDK have installed at the same time. If not, you could visit Sun homepage to download and install it. Here we will skip this step. 2, Prepare the hello.as code for "Hello ActionScript3" Use vi or your favorite editor to save following code as “hello.as”. Please pay attention the Capital and lowercase. package { import flash.display.*; import flash.text.*; public class hello extends Sprite{ public function hello (){ var t:TextField = new TextField(); t.text = "hello actionscript 3"; t.width = 300; t.height = 200; t.x = 50; t.y = 20; addChild(t); } } } 3, Compile Type and run following command, the as source file will be compiled to swf file. $ /tmp/flex/bin/mxmlc hello.as If success, you will find file hello.swf. Then type the following command directly. $ firefox hello.swf Do you see you own "hello actionscript 3"? 4, Create Makefile Makefile(make) is an expert system that tracks which files have changed since the last time the project was built and invokes the compiler on only those source code files and their dependencies. Perhaps for the example in this article, makefile may can’t show its advantage. But for the big projects which have many source files, makefile will be a important role. When you modified AS source files, what you do is just run “make” command. Use vi or your favorite editor to save following code as Makefile: MXMLC = /tmp/flex/bin/mxmlc MFLAGS = TARGETS = hello.swf all: $(TARGETS) clean: $(RM) $(TARGETS) .SUFFIXES: .as .swf .as.swf: $(MXMLC) $(MFLAGS) $< Then run following command $ make We will get the same result as run “/tmp/flex/bin/mxmlc hello.as”, you will see hello.as is compiled to hello.swf.
订阅后,新回复会通过你的通知中心匿名送达。
0 条回复
暂无回复 · 你可以订阅本帖等待新回复。