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.

#2086 Adding AS3 class and extending it from another user created class breaks SWF
Author:
Enrico

Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: Direct Editation
State: closed 

> What steps will reproduce the problem?
Have an SWF with at least one as3 class.
Add a new class.
Extend this new class from any class defined in the same DoABC2 tag.
> What is the expected output? What do you see instead?
I'am expecting nothing to change, but instead the whole swf breaks and refuses to run with
flashplayer 32
> What version of the product are you using? Is it "nightly build"? Which operating system
do you have?
tested on 18.5.0 and on 18.5.0 nightly build 2578 (latest as of posting this issue)
> Please provide any additional information below. If the problem is related to a SWF
file, attach it here, otherwise we can't help you.
Removing the extends from the newly added class or extending from a class in playerglobal
(like flash.display.Sprite) fixes everything. Re-adding the extends breaks everything
again.
I have added both a working and broken version of a very simplistic testing swf file


on which version of JPEXS did you make the working version? was it prior to v18.1.0? This
seems eerily familiar to the problem I had in #2052 and #2058. I had added a class prior
this one and it worked just fine, looking at it now, it didn't extend another class. When
I tried to add a sound (extends Sound), this issue occurred. now that you mentioned it, it
also explains why I was able to directly edit AS3 Source in this SWF I have posted, but
when editing another class like AI, I receive this exact issue and my flash debugger shows
this error
The problem in the broken file is that
the class test2 (which extends test) is placed in ABC structure earlier (has index 0) than
the class test (index 1).
I need to update FFDec somehow to use correct classes order (instanceinfo, classinfo) when
editing a class...
This sounds eerily similar to the issue I had in #2052 and #2058. Perhaps I was incorrect
about the root cause of the problem. I was successful in adding a class that didn't use
extend prior to this issue arising. When trying to add a new Sound (extends Sound), it
didn't work, I knew this had worked before so I made a ticket. This would perfectly
explain why I was able to edit "Status" without issue when I couldn't edit "AI" which
extends the "Unit" Class.
When I attempted to troubleshoot the problem with a flash debugger, I received the error
in the picture below.


my apologies, I thought reloading the page would stop the entire message from being sent.
I had forgotten to include the screenshot.
Puzzlecube - Both are created with 18.5.0, but the working one extends from
flash.display.Sprite rather than from a class within that DoABC2 tag
JPEXS - What would be the correct class order?
Enrico(OP): Please try nightly 2581. You need to resave the test2 class (Edit and save
same code) to change the class order.
Proper class order is test = index 0, test2 = index 1, as test2 extends test, that means
test needs to be defined before. The new nightly takes care of this and places newly
edited classes into correct positions based on their extends/implements clause.
State: new→upgraded
It appears you have indeed fixed issues relating to "extends" however, I am still getting
Error 1107 when directly editing certain classes in the SWF I attached such as "AI" and
"Guns", which doesn't even extend another class. This may be worth looking into as well.
Excellent work all around, this is going to help resolve so many headaches.
Puzzlecube: The problem 1107 should be fixed in nightly 2582.
If you encounter other problems, please create separate issue and do not write to this one
again.
This one is about extends clause and should be discussed with Enrico primarly.
JPEXS: Thank you, everything works perfectly for me with the new nightly build
State: upgraded→closed