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.

#2439 How do I import an ActionScript and override the old one?
Author:
unrealtournament2004

Date created:
Type: question
Visibility: Everybody
Assigned to:
Labels: AIRDirect EditationImport
State: opened 

I am currently editing an ActionScript for a game called Extra Lives and saving it comes
up with an error that the original developer left in. So what I did was I exported it as a
.as file and edited it with notepad. My problem is how do I even import the script? I
tried doing the Import Scripts button in the import tab and it says 1 script imported, yet
I don't see a difference in the actionscript.
If you want to report a problem - script not saving, not importing, etc., you'll need to
attach the SWF file you are talking about here and tell us which scripts you edit (+ which
changes),
otherwise we cannot help you.
The "import script" action should be used for bulk importing many scripts (with same
names),
if you want to edit only single script, I don't see a reason why not to edit it directly
in the FFDec UI - just find the script in the resources tree, select it, and on the right
panel, click "Edit ActionScript".
State: new→opened
I am editing the MainTimeline script on this SWF and I am changing the 50 to 0 on both
lines 22290 and 22292, then I am changing the 99 to 200 on lines 22294 and 22296. Editing
the actionscript itself proves to be too hard for me as the script is plagued with errors
that the original developer didn't fix, so clicking save wouldn't work.

Ad "plagued with errors"
The SWF file comes from AIR compiler, not standard Flash,
it uses classes like File, etc.,
so for proper editation, you need to select AIR library from the dropdown list on the
top-right corner of the ActionScript editor - see attachment.
The file is quite long, our AS compiler is not very stable - can have bugs.
If you want to be sure you edit only the number 50,
you can do it safely in P-code editor. Just click the 50 in the ActionScript editor, and
on the right side, you should see "pushbyte 50" instruction highlighted. Click "Edit
P-code", change the 50 to 0 and save.
Ad "import script"
The import script probably counts files with bugs as imported.
