compiling actionscript in linux

2019-06-27 10:56发布

I'm working on a website that requires a flash mp3 player. I have absolutely no idea the procedures from messing with flash/actionscript/flex etc., however I need to edit the flash very slightly (I need to add two lines of code). There are a multitude of tutorials out there for setting up a flash (or flex or whatever) development environment but, as my needs are so simple, I'd like to go a little more light-weight than that (also, many seem outdated). I guess what I'm saying is I'm looking for a simple way to recompile some existing actionscript (command line is a plus!). Does anyone have a trick up their sleeve to accomplish this?

5条回答
虎瘦雄心在
2楼-- · 2019-06-27 11:16

General Linux

On linux you can get the source from swftools.org.

Debian / Ubuntu

On debian / ubuntu you can run

apt-get install swftools

Mac OS X

Not exactly 'linux' but on mac OS X if you have homebrew installed you can do:

brew install swftools

Great, but how do I compile the code?

One this is installed you should have a new utility that you can use to do:

as3compile MyAs3File.as

Gotchas

Please note this is not a 1:1 replacement for Adobe's compiler - there are some things that it does not support ( see documentation, FAQ, changelog at swftools.org ) but it worked well for compiling my simple actionscript.

查看更多
We Are One
3楼-- · 2019-06-27 11:24

Download the free/opensource Flex 3 SDK. This includes an ActionScript3 compiler. Run the compiler like this:

mxmlc MyAs3File.as
查看更多
不美不萌又怎样
4楼-- · 2019-06-27 11:26

I also wanted to say that swftools has exactly what you need. There is a swfc compiler which will compile as2 files. I would really recommend updating the source though. AS3 is much faster than AS2 and there are a lot of tools out there for example mxmlc and fcsh included in the open source Flex sdk. If you are looking for a full blown IDE there is a linux version of Flash Builder that was released as an open source port ... there are a couple other ones out there as well.

查看更多
男人必须洒脱
5楼-- · 2019-06-27 11:28

There's MTASC for ActionScript 2.

查看更多
孤傲高冷的网名
6楼-- · 2019-06-27 11:37

You can compile it online here: http://wonderfl.kayac.com/. No mess that way.

查看更多
登录 后发表回答