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 issues#472 getlex vs getlex Qname isn't the same
Author: capasha
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS3
State: closed
> What steps will reproduce the problem?
The old client used getlex m[number]
The new client using getlex Qname(ProtectedNamespace(
This is the old way:
getlex m[616]"states:PlayState.player"
getlex m[616]"states:PlayState.player"
getproperty m[1829]"ismod"
not
setproperty m[1829]"ismod"
^ old client, no decompiling errors.
If i do the same with the new. which should be like this:
getlex Qname(ProtectedNamespace("states:PlayState"),"player")
getlex Qname(ProtectedNamespace("states:PlayState"),"player")
setproperty Qname(PackageNamespace(""),"ismod")
not
setproperty Qname(PackageNamespace(""),"ismod")
^ new client I get decompiling errors
> What is the expected output?
To work like i did the in the old client.
What do you see instead?
new client gives decompiling errors.
> What version of the product are you using? On what operating system?
Windows 7 x64, newest nightly build.
> Please provide any additional information below. Attach the file you have problem with
if neccessary. If you do not want to publish files YOU CAN CHANGE VISIBILITY TO PRIVATE
The changes I do is inside States > PlayState and tick()
freegame.swf (3,182 KiB)
Error i got in logs, http://pastebin.com/JfChWPfv
http://i.imgur.com/gyGFDme.png <- There I try to add it. But it ends in decompiling
error. And the freegame swf I use for that hotkey.
freegame1.swf (3,190 KiB)
I still don't understand your problem.
I opened States.PlayerState.tick method, modified the AVM2 code in the right textarea.
Added the following lines:
getlex Qname(ProtectedNamespace("states:PlayState"),"player")
getlex Qname(ProtectedNamespace("states:PlayState"),"player")
getproperty Qname(PackageNamespace(""),"ismod")
not
setproperty Qname(PackageNamespace(""),"ismod")
after: callpropvoid Qname(Namespace("playerio:Connection"),"send") 1
The result, in the "decompiled text area":
{
if((Bl.isKeyJustPressed(71)) && (Bl.data.canEdit))
{
this.connection.send("god",!this.player.isgod);
}
if((Bl.isKeyJustPressed(80)) && Bl.data.isModerator == true)
{
this.connection.send("mod");
player.ismod = !player.ismod; // THIS LINE IS NEW
}
}
So what is the problem? Please explain me.
Btw: i just saw, that you have 2 setproperty call, the first should be getproperty as in
your "old client example". It is wrong in your screenshot, too.
Looks like i missed that part. Thanks anyway, I think this one can be closed now.
State: new→closed