Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
809 views
in Technique[技术] by (71.8m points)

flash - How can I edit the action script within an SWF file?

I have a rather large SWF file (27Mb) and as a project i'd like to edit the action scripts within it and also change a few images around. Using JPEXS free flash decompiler, I was able to replace the images I wanted. But when I try to save changes to the main script, the program gets stuck on a line that I hadn't changed at all.

Line 2788: if(saveFile.data.tableTeacher[this.day] == null)

The program pops up a message saying "PARENT_CLOSE expected but COMMA found on line 2788"

Here is a snippet of code leading up to the error line:

for(this.day = 0; this.day <= 5; this.day++) 
{ 
    if(saveFile.data.tableSubject[this.day] == null) 
    { saveFile.data.tableSubject[this.day] = new Array(); } 
    
    if(saveFile.data.tableRoom[this.day] == null) 
    { saveFile.data.tableRoom[this.day] = new Array(); } 
    
    if(saveFile.data.tableTeacher[this.day] == null) //# Line 2788
    { saveFile.data.tableTeacher[this.day] = new Array(); } 
    
    if(saveFile.data.tableAttend[this.day] == null)

    .... etc

Is there any other way I can edit actionscripts?

question from:https://stackoverflow.com/questions/65646209/how-can-i-edit-the-action-script-within-an-swf-file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You need to post more code around that block of code.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...