JPEXS Free Flash Decompiler Issue Tracker

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.

List of issuesList of issues

#2072 issue with fully qualified names
Author: user 3plus4i
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed Help

I'm trying to edit a file where I have to use fully qualified names because of a naming conflict. The file originally uses only Starling sprites, but I have to add a native Flash Sprite, because Starling doesn't support text input fields. So I replaced all the existing `new Sprite()` commands with `new starling.display.Sprite()`, which works fine. But my added line `new flash.display.Sprite()` throws an error 'Variable flash is not defined'. Checking the P-Code, it says > getlex QName(PackageNamespace(""),"flash") > getproperty Multiname("display",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),Pa ckageInternalNs(""),PrivateNamespace("Menu"),ProtectedNamespace("Menu"),StaticProtectedNs( "Menu"),PrivateNamespace("Menu.as$53")]) > constructprop Multiname("Sprite",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),Pac kageInternalNs(""),PrivateNamespace("Menu"),ProtectedNamespace("Menu"),StaticProtectedNs(" Menu"),PrivateNamespace("Menu.as$53")]), 0 That doesn't look correct, although I know P-Code barely at all. I'm not sure whether it's an issue with the compiler or whether I'm doing something wrong, so I'm going to post it as a question.
user
Peculiar: I just noticed that the variable initialization works fine `public var EDTinputContainer:flash.display.Sprite;` in the import section I put `import flash.display.Sprite;`
admin
1) What version of FFDec do you use? 2) Could you attach sample code - the whole script? And also the whole SWF you are talking about would be great. I tried to compile the sample in attachment and it was working okay for me.
Downloadtest_2072.png (119 KiB)
State: new→opened
user
1) 18.5.0 2) I'll attach both. The issue is in line 99. Also, unrelated to my actual issue, the method updateSprites() looks like it doesn't represent the entire code in the decompiled file.
DownloadIdle Sword edit.swf (4,492 KiB)DownloadMenu.as (26 KiB)
admin
The "Variable flash is not defined" problem should be fixed in nightly 2554. To the updateSprites method: The method in the swf file you attached does not contain any more code. Maybe original unedited SWF contained more code, then at some point, was lost. Please attach original unmodified code(SWF) so I can investigate whether there was any code previously.
user
The P-code looks different, but I have no idea what's supposed to be going on there. Here is the original file:
DownloadIdle Sword.swf (4,489 KiB)
admin
In the "Idle Sword.swf" file, the updateSprites method contains only switch(this.director.state) { case "menu": case "startGame": } and nothing more. The P-code does not contain anything other than this. It seems that updateSprites does not do anything useful. So it's not a problem in FFDec.
State: opened→upgraded
Type: question→bug
user
Thanks! Good to know.
user
I can confirm that the issue is solved in v.19.0.0. Thanks again!
admin
State: upgraded→closed