mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 05:00:49 +00:00
Changed: AS1/2 - Single DoAction tag inside frame as frame node
This commit is contained in:
@@ -3276,18 +3276,22 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
|
||||
}
|
||||
} else if (treeItem instanceof FrameScript) {
|
||||
FrameScript frameScript = (FrameScript) treeItem;
|
||||
Frame parentFrame = frameScript.getFrame();
|
||||
for (TreeItem subItem : parentFrame.actionContainers) {
|
||||
getASMs(exportFileNames, getASMWrapToTagScript(subItem), nodesToExport, exportAll || exportNode, asmsToExport,
|
||||
pathExportFilenames + File.separator + getASMPath(true, subItem),
|
||||
pathNoExportFilenames + File.separator + getASMPath(false, subItem)
|
||||
);
|
||||
}
|
||||
for (TreeItem subItem : parentFrame.actions) {
|
||||
getASMs(exportFileNames, getASMWrapToTagScript(subItem), nodesToExport, exportAll || exportNode, asmsToExport,
|
||||
pathExportFilenames + File.separator + getASMPath(true, subItem),
|
||||
pathNoExportFilenames + File.separator + getASMPath(false, subItem)
|
||||
);
|
||||
if (frameScript.getSingleDoActionTag() != null && !exportFileNames) {
|
||||
asmsToExport.put(pathNoExportFilenames, frameScript.getSingleDoActionTag());
|
||||
} else {
|
||||
Frame parentFrame = frameScript.getFrame();
|
||||
for (TreeItem subItem : parentFrame.actionContainers) {
|
||||
getASMs(exportFileNames, getASMWrapToTagScript(subItem), nodesToExport, exportAll || exportNode, asmsToExport,
|
||||
pathExportFilenames + File.separator + getASMPath(true, subItem),
|
||||
pathNoExportFilenames + File.separator + getASMPath(false, subItem)
|
||||
);
|
||||
}
|
||||
for (TreeItem subItem : parentFrame.actions) {
|
||||
getASMs(exportFileNames, getASMWrapToTagScript(subItem), nodesToExport, exportAll || exportNode, asmsToExport,
|
||||
pathExportFilenames + File.separator + getASMPath(true, subItem),
|
||||
pathNoExportFilenames + File.separator + getASMPath(false, subItem)
|
||||
);
|
||||
}
|
||||
}
|
||||
} else if (treeItem instanceof AS2Package) {
|
||||
AS2Package as2Package = (AS2Package) treeItem;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.timeline;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.tags.DoActionTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.Exportable;
|
||||
import com.jpexs.decompiler.flash.treeitems.Openable;
|
||||
import com.jpexs.decompiler.flash.treeitems.TreeItem;
|
||||
@@ -70,8 +71,22 @@ public class FrameScript implements TreeItem, Exportable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (getSingleDoActionTag() != null) {
|
||||
return frame.toString() + " - " + "DoAction";
|
||||
}
|
||||
return frame.toString();
|
||||
}
|
||||
|
||||
public DoActionTag getSingleDoActionTag() {
|
||||
if (!frame.actionContainers.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (frame.actions.size() != 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return frame.actions.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets export filename.
|
||||
|
||||
Reference in New Issue
Block a user