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.

#517 AS1/2 direct editation: delete operator, etc.
Author:
deleted-FjT5MDkkfQCbTmonyvIp

Date created:
Type: bug
Visibility: Everybody
Labels: AS1/2Direct Editation
State: closed 

Hi,
I have a problem with saving an SWF actionscript. What happens when i edit it it says
error on Command Line Invalid and when i delete that line (Even though it's important) it
says another line is invalid. Is there a way to disable the message.
Thanks
Haroon
Hi,
Ok so is there away to disable this
okay, so the file is in issue #519.
What version of product do you use?
In latest nightly build, many ActionScript issues were fixed.
Did you try it?
I am running the current version.
Please tell my what Sprite / Script you edit.
Do you edit p-code (on the right) or directly actionscript (on the left side)?
hi
it's called frame1 DoAction.
Whats the diffrence with p-code or actionscript on the left?
Thanks
Haroon
What is current version for you?
Is it 1.8.1u1?
Or actual nightly build - ffdec_1.8.1u1_4cfedd9d0d4f ?
You can download nightly build from menu Download-Nightly builds
There are still some bugs I see, I will fix it...
Hi i got version 1.8.1u1
State: new→opened
New nightly build was just released.
Please try it. You can download it here in menu Download-Nightly builds.
Unfortunately, direct AS editation is still experimental and we cannot guarantee correct
compilation.
You can edit P-code on the right side, that should be better.
State: opened→upgraded
Title: Saving an SWF when editing→AS1/2 direct editation: delete operator, etc.
Title: Saving an SWF when editing→AS1/2 direct editation: delete operator, etc.
Hi
I can't see it on my computer please could you send a link to the download page.
Thank you
Haroon
Hi.
Thank you very much it works perfectly. Thanks for all your help i appreciate it.
Thanks
Haroon
Hi
I just installed the SWF to the system there is still problems. I took out one line and it
changed the whole SWF
Which line did you removed?
On the SWF i deleted line (1042) and line (1052-1055) and the whole file changed if you
look at the front of the SWF before editing it should be blank white but when i deleted
the line the bit that didn't meant to show ,showed.
Haroon
So you removed the if condition, this line?
if(shell.isPlayerMascotById(shell.getMyPlayerId()))
and the "else" branch?
else
{
showContent("w.safetyquiz");
}
yes
In this case please do not use direct ActionScript editing, because it is epreimental, ant
it is not working with your complex script. Please use P-Code editing (right panel)
If you only want to remove an "if" condition, and you knows any programming language, then
you can find how to remove it from P-Code, you need to change only an "If" action to a
"Pop" action.
In your case it is in line 2674.
*experimental, and
Can I close this issue?
sorry for the late responce. It doesn;t work through P-Cod
What is the problem?
i need to edit the actionscript from the SWF but only one line. It says error on line.
JPEXS tols me to download Nightly so i did and it worked but it changed the whole file so
the preview of the swf should be blank but when i edit it's shows the stuff that isn't
meant to show
I told you not to edit the actionscript source. You should edit the P-Code. I wrote you
what should you modify. Please try it. And write when there is a problem with P-Code
editing.
On the p-code it doesn't show, Could you try it please.
I tried it, and i had no problem with modifing the P-Code. Check the attached swf.
Where did you stuck?

Thanks, It worked on your computer but not mine. What version are you running
I have the latest unstable version, but i'm sure that it is working with latest stable or
latest nightly build, too. Did you followed my stepps? Do you know any programming
language? Do you know what is assembly (programming language) P-Code is similar to it.
No? I'm new to JPEXS and coding. But I am just looking at the code where is the P-Code
left or right
P-Code is on the right.
You should do the following:
Open your swf, open the script you want in the left tree.
Press Edit button on P-Code panel (right panel)
Modify the follwing line:
line 2681 If loc9c47
to:
line 2681 Pop
Press Save on P-Code panel.
Press Save on ribbon (save swf file)
Alternatively you can remove the following marked lines:
DefineFunction2 "" 0 2 false false true false true false true false false {
Push 0.0 "shell" <= REMOVE
GetVariable <= REMOVE
Push "getMyPlayerId" <= REMOVE
CallMethod <= REMOVE
Push 1 "shell" <= REMOVE
GetVariable <= REMOVE
Push "isPlayerMascotById" <= REMOVE
CallMethod <= REMOVE
Not <= REMOVE
If loc9c47 <= REMOVE
Push "interface_mc"
GetVariable
Push "widgets_mc"
GetMember
Push "mascotScriptClip"
GetMember
StoreRegister 1
Pop
Push register1 null
Equals2
Not
If loc9c2f
Push 0.0 "interface_mc"
GetVariable
Push "widgets_mc"
GetMember
Push "getNextHighestDepth"
CallMethod
Push "mascotScriptClip" "com.clubpenguin.ui.MascotScript" 3 "interface_mc"
GetVariable
Push "widgets_mc"
GetMember
Push "attachMovie"
CallMethod
StoreRegister 1
Pop
Push register1 1 "centerWidget"
CallFunction
Pop
loc9c2f:Push 0.0 register1 "show"
CallMethod
Pop
Jump loc9c57 <= REMOVE
loc9c47:Push "w.safetyquiz" 1 "showContent" <= REMOVE
CallFunction <= REMOVE
Pop <= REMOVE
}
That doesn't show on my screen, on the orignal
Is there a Video on how to do that
No, there is no video. But i can show you in your machine with teamviewer. (If you agree)
Hi,
Thanks I appreciate that, When could we do it. I can do it any time after 3.30PM GMT (UK
TIME)
4:00 PM GMT? Do you have any IM program? gtalk, skype, facebook chat?
Please do not post contact info here on issue tracker.
I can give honfika your email address Haroonbg, do you agree?
I must implement some kind of PMs here...
Hi that would be great! My Skype username is xxxxx but my Microphone doesn't work so i
can't talk.
Thanks
Haroon
edit: admin removed contant info
Sorry ,I didn't read the last comment. Could you remove the one with my Skype. To honfika
that would be great if you could give him my email or my Skype username.
Thanks
Haroon
Thank you honfika for all the help you gave me. I appreciate it. JPEXS honfika was really
good at the support he gave me, He's one of the best support people who has ever helped
me.
Thanks again!
Haroon
Yes, Thanks honfik and JPEXS
State: upgraded→closed