View Full Version : Compilers for compiling AS 3.0 to ActionByteCode
prabakaranz
April 9th, 2008, 02:05 AM
Hi All,
Can anyone suggest me a good compiler for compiling the as3.0 code to action bytecode. I tried using asc.jar which comes with flex builder. But i was not able to compile the actionscript method which i wrote. Also let me know how to use asc.jar to compile the actionscript3.0.
The compiler has to be based on java.
Please help me out.
Thanks in advance,
Prabakaran Srinivasan.
Jerryscript
April 9th, 2008, 11:29 AM
With the flex package, the compiler is mxmlc.exe and is located in the bin directory. You can compile AS3 classes with a simple command line:
C:\PATH_TO_FLEX_INSTALL\bin\mxmlc.exe C:\PATH_TO_AS3_CLASS\AS3_CLASS.as
You can also specify tons of compiler options, Senocular has a quick tutorial here on this method.
dzhedzho
April 9th, 2008, 03:09 PM
Where will you use the ABC?
Jerryscript
April 9th, 2008, 06:36 PM
The output is a swf file.
prabakaranz
April 10th, 2008, 05:07 AM
With the flex package, the compiler is mxmlc.exe and is located in the bin directory. You can compile AS3 classes with a simple command line:
C:\PATH_TO_FLEX_INSTALL\bin\mxmlc.exe C:\PATH_TO_AS3_CLASS\AS3_CLASS.as
You can also specify tons of compiler options, Senocular has a quick tutorial here on this method.
Hi Jerry,
I had gone through the tutorial suggested by you. But i wanted to embed this asc.jar into my application which does method injection into existing flash files. Also, From that website i learnt that, mxmlc takes care of the integration of mxml and the as files into SWF and mxmlc, itself is not a compiler and asc is used for that purpose. If that s the case, then why am i not able to compile the .as classes using asc.jar.
Or, as you suggested, i cant use asc.jar seperately or what?
Please let me know your views on this.
Thanks in advance.
Prabakaran Srinivasan.
prabakaranz
April 10th, 2008, 05:16 AM
Always when i tried to compile a .as class using asc.jar, it gives an error like
Error:1017, The definition of base class Object not found.
From this i understood that, the other .as files related to AS3.0 needs to be kept in the path, so that the compiler, when compiling a class file can find the appropriate files in the path and it can compile the .as file to bytecode.
How to place the .as files in the path, so that the compiler can identify the needed .as files.
Please give me your inputs on this.
Thanks in advance,
Prabakaran Srinivasan.
jwopitz
April 10th, 2008, 11:01 AM
I understand you probably want to do this dynamically but for starters, you might check this out.
If you want the ABC, you might just compile as normal but then check out a swf cracker application. That would show you the contents of the swf's ABC I believe. I can't remember what the name of the application/company is but someone here probably knows.
jwopitz
April 10th, 2008, 11:05 AM
got it:
Flasm is probably what you might look at. Then you can figure a way to use that to your real goal.
jwopitz
April 10th, 2008, 11:12 AM
ok so I got that wrong. Flasm is only for AS2. But then I remember the Tamarin project has something where you can get at the ABC when you compile your swfs. Hope all this back and forth crap I did helps rather than confuses you.
prabakaranz
April 15th, 2008, 05:38 AM
Hi jwopitz,
Thanks for the replies. I will try with the tamarin decompiler. But, I want to do that actionbyte code generation dynamically using my java source code. So i was looking for some java based compilers and i found only asc.jar from Flex builder SDK. Can you please suggest me any one of those java based open source compilers. Iam running out of time to complete my work. I am already successful in injecting AS1.0 related code into SWF using another open source compiler which is compatible only with AS1.0. So, please suggest me, a good open source java based compiler to compiler scripts of version 3.0.
Thanks in advance.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.