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.

#1483 -replace commandline arguments question
Author:
mojtaba

Date created:
Type: question
Visibility: Everybody
Assigned to:
State: closed 

I did not succeed in replacing a script with another script through the graphical user
interface
because the import option did not work. The script's import message will appear, but will
not be replaced.
I used the following command later and encountered an error:
"c:\Program Files (x86)\FFDec\ffdec.bat" -replace "D:\TVecSwf\scripts\TVec.as"
"D:\test\TVecProject.swf" "scripts\TVec"
Is my use form correct?
The syntax is:
-replace <infile> <outfile> <scriptName1> <importDataFile1> [<scriptName2>
<importDataFile2>...]
<infile> - input SWF file
<outfile> - output SWF file
<scriptNameX> - the name of the script to replace. You can list all names of scripts in
the SWF file by running -dumpAS2 or -dumpAS3 commands.
<importDataFileX> - actual file with ActionScript code. If it has .as extension, then it's
compiled as ActionScript, otherwise its considered P-code.
Example (AS1/2):
ffdec.bat -replace myfile.swf changed.swf "\frame 29\DoAction" modifiedFrame29.as
or (AS3):
ffdec.bat -replace myfileAs3.swf changedAs3.swf "com.jpexs.pkg.MyClass"
mod\com\jpexs\pkg\MyClass.as
Note that the script is compiled using our own compiler (aka "direct editation" in FFDec
GUI) which is buggy.
State: new→upgraded
Thanks , and is there a way to find out what's this error about :
SEVERE: Uncaught exception in thread: main
java.lang.NullPointerException
at java.lang.String.replace(Unknown Source)
at
com.jpexs.decompiler.flash.console.CommandLineArgumentParser.replaceAS3(CommandLineArgumen
tParser.java:3654)
at
com.jpexs.decompiler.flash.console.CommandLineArgumentParser.parseReplace(CommandLineArgum
entParser.java:2999)
at
com.jpexs.decompiler.flash.console.CommandLineArgumentParser.parseArguments(CommandLineArg
umentParser.java:919)
at com.jpexs.decompiler.flash.gui.Main.main(Main.java:1976)
I answered in #1484.
State: upgraded→closed
Title: Importing a script , in latest release doesn't work !→-replace commandline arguments question
Title: Importing a script , in latest release doesn't work !→-replace commandline arguments question