JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit

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

List of issuesList of issues

#1777 -importScript doesn't work as expected
Author: user yukkerike
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: Import scriptsP-code
State: new Help

I've exported some classes, edited them and now I'm trying to patch an swf with them as mentioned here: / The result is those classes stay untouched. When I'm trying to import .pcode from gui, it says "0 scripts imported." I did: java -jar ffdec.jar -selectclass Config -format script:pcode -export script ./source client.swf java -jar ffdec.jar -importScript client.swf client_patched.swf ./source
Hello, I digged through the source code and found out: The importScript Option only accepts files with the .as Extension. I also looked through the history of the respective source file - it seems it has always only supported files with the ".as" extension. The GUI and the CLI use the same function. Source file: com.jpexs.decompiler.flash.importers.AS3ScriptImporter
Yes, the "Import script" feature only bulk imports ActionScripts, not a p-codes, it always did. However, to replace single AS3 method via commandline, you can use -replace command. Example: java -jar ffdec.jar -replace "file.swf" "file_out.swf" mypkg.MyClass inputfile.txt 12345 where 12345 is method body id, mypkg.MyClass is script name. You can enable display of method body ids in FFDec on Advanced settings / Scripts page or by adding -config showMethodBodyId=true prefix to your commandline export command. If you want to bulk modify/import many scripts, I recommend you using for example RABCDasm tool which does pretty good job (and is fast as hell). See For AS1/2 you do not need method body id, just proper ScriptName.
One additional note: for -replace command, current FFDec version (18.4.0) has a bug preventing passing only 3 arguments to the -replace command. You need for example nightly version 2518 or later where this is fixed.