+ update 2020: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means we will NOT develop new features and/or fix most of bugs. We left the tracker running in case somebody from community would like to work on it. Sorry for the inconvenience.
State: closed new: Initial state. As long as issue is in this state, the work on the issue has not yet begun. opened: Opened state means developer started working on the issue. Feature/Fix will probably be in the next release. postponed: This means developer is not working on it now, for some reason it cannot be implemented now. Issue may be opened again in the future. upgraded: Issue is in upgraded state when developer made changes to the program and new version was released. closed: This means the user is satisfied with issue results and no more changes are needed. invalid: These issues cannot be solved. ignored: Developer decided to take no action on this issue. returned: Program changes were made but user is not satisfied and returned the issue.
Warning: extreme newbie question
When I try to use the as3hx haxe tool to translate actionscripts output from ffdec to
haxe, it gives me an error such as "Unexpected on" when trying to translate the script. I
assume this is because of the absence of package and class declarations in the
actionscript, but how can I get these in ffdec? Is it even possible? Am I even asking this
in the right place?
Could you please provide sample (decompiled) ActionScript file which you tried to
And please tell us whole "Unexpected on" message including line.
I don't know how as3hx tool works and details about haxe,
but if there's bug in the decompiled AS, we need to fix our decompiler - that's job for
If we find that the AS code coming from FFDec is correct, then we can't do more.
I already found some specific Haxe code in SWF files.
There is for example the "cast" command, which FFDec decompiles as §§push/§§pop
commands, which then cannot be compiled back by other compilers than FFDec (including
If you see some § characters anywhere in the code, it will mean that it can't be compiled
outside of FFDec and thus even in as3hx...
See FAQ: /www.free-decompiler.com/flash/faq/ 13-16.
We can talk about supporting haxe "cast" feature in FFDec in the future.
This usually uses push/pop.
If it's related to other haxe SWF features, we can't help you.
If it's because invalid identifier then you can rename those identifiers.
I would just like to see the package and class headers, along with the fully qualified
class names, as they are in the attached snippet, because this seems to be what as3hx
takes as input. I apologize for any misunderstanding and please pardon my ignorance.
Attached is the file that causes the error. Please note that it does not contain the
"package" statements and "class" declarations. I believe the absence of these is what is
causing the error, although I may be misinterpreting something.
The file you attached (onrelease.as) looks like ActionScript1/2 event handler.
I think haxe requires ActionScript3.
If you are not experienced in Flash - ActionScript3 is new version of scripting in SWF
files which provides many new functionality regarding Object programming. I bet Haxe
requires ActionScript3 files. This is the reason your file does not work - you are trying
to convert AS1/2 file.