Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AS3 to JS compilers

I stumbled accroos the AS3 to JS compiler Jangaroo, which looks like it could be a useful tool since it supports a lot of things I like about AS3.

  • Are there any other such compilers?
  • Is there another language I could learn, that compiles to JS, that is AS3 like?
like image 914
davivid Avatar asked Oct 05 '10 12:10

davivid


People also ask

Is ActionScript 3.0 still used?

ActionScript is basically a dialect of JavaScript (which is also called ECMAScript). So you can still use it.

What is ActionScript 3?

ActionScript 3 is an object-oriented programming language originally created by Macromedia Inc., which continued to evolve after being acquired by Adobe Systems. It is a superset of the ECMAScript standard (more widely known as JavaScript) with a stronger focus on classes, interfaces, and objects.


2 Answers

Haxe

From the intro page:

Haxe (pronounced as hex) is an open source programming language.

While most other languages are bound to their own platform (Java to the JVM, C# to .Net, ActionScript to the Flash Player), Haxe is a multiplatform language.

It means that you can use Haxe to target the following platforms :

Javascript : You can compile a Haxe program to a single .js file. You can access the typed browser DOM APIs with autocompletion support, and all the dependencies are resolved at compilation time.

Flash : You can compile a Haxe program to a .swf file. Haxe can compile for Flash Players 6 to 10, with either "old" Flash<8 API or newest AS3/Flash9+ API. Haxe offers very good performance and language features to develop Flash content.

NekoVM : You can compile a Haxe program to NekoVM bytecode. This can be used for server-side programming such as dynamic webpages (using mod_neko for Apache) and also for commandline or desktop applications, since the NekoVM can be embedded and extended with some other DLL.

PHP : You can compile a Haxe program to .php files. This enable you to use a high level strictly-typed language such as Haxe while keeping full compatibility with your existing server platform and libraries.

C++ : You can now generate C++ code from your Haxe source code, with the required Makefiles. This is very useful for creating native applications, for instance in iPhone development.

Also of possible interest to you: Haxer, a java project i wrote that helps convert AS3 code to Haxe code. It is not complete, but it gives you a good start in converting your code.

like image 127
Jason Miesionczek Avatar answered Sep 26 '22 12:09

Jason Miesionczek


Tadster made an AS3 to JavaScript set of AS3 classes, the com.actiontadJS.converter package.

You have to be pretty good at AS3 to understand and use it well.

But the package of classes has been available for some time and it works pretty good, it produces OOP JavaScript, but does not convert imports or inheritance, so it's good for writing JavaScript Classes in AS3 first, takes away some of the tedium of writing OOP JavaScript.

http://www.actiontad.com/basicGameObjects/

like image 22
Bersegla Avatar answered Sep 22 '22 12:09

Bersegla