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.

#1292 How to add Your Own Variables to a class
Author:
Xploit

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

So I've used FFDec for a few years now.. Its always been great but recently its been
breaking Swf's alot.. Luckily ive gotten into hex editing.. But right now im in a pretty
tough spot...
I Need to add my own variables without using the Actionscript source editor built into
FFDec...
As it keeps breaking the flash files what i need is to add a public variable to a class
but the P-Code editor wont allow that i believe..?
i think it only supports changing them not adding them..
So what i'm asking is how would i go about doing this? will i be able to do it in FFDec or
will i need to use another method?
You probably mean ActionScript3 classes, don't you?
There is small button with icon called "add trait" on the top of central ActionScript
editor.
If you press it, new trait should be added, it should work relatively easy without
breaking anything (=definitely more reliable than editing whole class)
Trait = method or const or var field on the class.
Warning: There's no delete trait button (as far as I remember)
Editing ActionScript of whole class (we call it "Direct Editing") has many bugs, we know
it.
You can't expect us to make same quality compiler as Adobe did. We tried a lot and
improving when we find something. In nightly build, we added support for compiling with
Flex SDK, but there are other problems with it to solve - we need to properly integrate it
and force it to support obfuscated identifiers (I have an idea how to do it)
On the other side - I think for example ActionScript1/2 direct editation is working pretty
well - it's much more reliable than AS3. AS3 and it's bytecode format is way more complex,
that's why it's not good in FFDec.
Yeah i just figured that out a few days after this post , But yeah the AS2 Editor is
pretty great , I Still cant find a good AS2 IDE since FlashDevelop removed the option for
it and cant find the Plugin anywhere.. But yeah i understand its hard to perfect the AS3
editor , im still having trouble understanding how to write my own bytecode so i usually
just make a change in the direct editor and copy the bytecode for my change then reload
the SWF and modify the bytecode
State: new→closed