4

is there a tool which can convert actionscript3 source code to java source?

Elias Haileselassie
  • 1,385
  • 1
  • 18
  • 26
  • Given the Flash plug-in's great support for advanced media types, one huge challenge would be to supply the missing codecs, and support for the missing formats, within Java. – Andrew Thompson Mar 16 '11 at 09:05

4 Answers4

7

I ran into this page awhile ago because I needed an actionscript to java converter too. I wrote one myself. It's very simple and requires manual adaptation after conversion (as most such converters do), but it does a good job of automating the boring stuff. You can find it on my blog.

2

I believe Haxe (which has similar syntax to AS3, also based on the ECMA Specification) is able to compile to Java (as well as a slew of other languages and bytecodes). It requires learning a new language, but it may be worth it.

Gama11
  • 31,714
  • 9
  • 78
  • 100
IQAndreas
  • 8,060
  • 8
  • 39
  • 74
  • 1
    Sorry, seems like the Java compilation/translation is [still in progress](http://twitter.com/#!/cwaneck/status/15486381623091200). But [it's on it's way](http://twitter.com/#!/cwaneck/status/46650456000311296). – IQAndreas Mar 16 '11 at 11:32
1

You should explain why you want to convert from AS3 to Java. I think, the typically way is to convert from Java to AS3, e.g. with Gas3.

splash
  • 13,037
  • 1
  • 44
  • 67
  • 1
    He may want to convert if he using BlazeDS. It would be difficult to convert logic, but one can easily convert getters and setters of a Java object into an equivalent AS3 class.44 – sean Mar 23 '11 at 17:39
0

You will be able to do this via Haxe in near future. First use as3hx to convert AS3 to Haxe, and then you can convert Haxe to Java via Haxe compiler. Haxe/Java was promised to be relased in this year.

Gama11
  • 31,714
  • 9
  • 78
  • 100
Eugeny89
  • 3,797
  • 7
  • 51
  • 98