JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#2216 AS2/AS1 Methods being decompiled all in lowercase instead of camelCase
Author: user Grubsic
Date created:
Type: question
Visibility: Everybody
Assigned to:
Labels: AS1/2Decompilation
State: closed Help

> What steps will reproduce the problem? Decompile an AS2/AS1 SWF > What is the expected output? What do you see instead? Some methods are not being correctly decompiled, they are in lowercase (and flash cs6 doesn't throw errors anyways), some examples I've seen so far are: gotoAndStop -> gotoandstop -> happens when accessing from members (like this: mc.anotherMc.etc.gotoandstop, when is in the same movieclip, is decompiled correctly) gotAndPlay -> gotoandplay -> same as above key.isDown -> key.isdown Mouse.hide -> mouse.hide swapDepths(mc) -> I believe should be this.swapDepths(mc) when calling from the movieclip, but I might be mistaken. > What version of the product are you using? Is it "nightly build"? Which operating system do you have? I tested from lastest release and all nightly since then. > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. Happens with as2 and as1, code, didn't test as3. I attached a famous game written in as1 (original swf), decompile it, and check the source, I had to use Flash CS6 replace tool to fix around 500 wrong methods. I used default decompiler settings.
admin
This SWF file uses Flash version 6, which means it has case insensitive identifiers. CallMethod instructions on a member are compiled with method name as string, the string is written directly in the P-code. For example _root.gotoandstop(2); becomes: Push 2, 1, "_root" GetVariable Push "gotoandstop" //see this CallMethod Pop On the otherside, when you use toplevel gotoandplay(2), it is compiled as GotoFrame 1 P-code instruction, which has no String argument, and thus can be easily converted to its proper casing like gotoAndPlay. If you want to make the code case sensitive, the decompiler could (if implemented) try to make some well known methods use proper casing, but you would still have left many other errors related to for example variable naming casing problems. So back to your problem, you said: "Some methods are not being correctly decompiled" This is untrue, as the code is decompiled right as it was written - the developer probably wrote the gotoandstop all lowercase, because he liked it that way, and it is correct code in FP6. If you want to compile such decompiled code back into SWF, for example in Flash CS6, you need to set Publish target to "Flash player 6" with the script option set to "ActionScript 1".
State: new→opened
Type: bug→question
user
Didn't know about the case sensitive thing from Flash CS6, thanks for the explaination!, everything solved.
user
Sorry, I meant Flash 6, not "CS6", my bad.
admin
okay, no problem.
State: opened→closed