From 3eb247bbc875ea5c8a6c5e28b30bf1e61019bc6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sun, 30 Dec 2012 20:48:45 +0100 Subject: [PATCH] AS3: counting tags during export --- trunk/src/com/jpexs/asdec/SWF.java | 8 ++++++-- trunk/src/com/jpexs/asdec/abc/ABC.java | 10 +++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/trunk/src/com/jpexs/asdec/SWF.java b/trunk/src/com/jpexs/asdec/SWF.java index 65323ce49..e5a04757e 100644 --- a/trunk/src/com/jpexs/asdec/SWF.java +++ b/trunk/src/com/jpexs/asdec/SWF.java @@ -304,9 +304,13 @@ public class SWF { asV3Found = true; } } - for (DoABCTag t : abcTags) { + for (int i = 0; i < abcTags.size(); i++) { + DoABCTag t=abcTags.get(i); t.abc.addEventListener(evl); - t.abc.export(outdir, isPcode, abcTags); + t.abc.export(outdir, isPcode, abcTags,"tag "+(i+1)+"/"+abcTags.size()+" "); + } + for (DoABCTag t : abcTags) { + } if (!asV3Found) { diff --git a/trunk/src/com/jpexs/asdec/abc/ABC.java b/trunk/src/com/jpexs/asdec/abc/ABC.java index 59e4aaf9b..00f91a9f7 100644 --- a/trunk/src/com/jpexs/asdec/abc/ABC.java +++ b/trunk/src/com/jpexs/asdec/abc/ABC.java @@ -516,6 +516,10 @@ public class ABC { } public void export(String directory, boolean pcode, List abcList) throws IOException { + export(directory, pcode, abcList, ""); + } + + public void export(String directory, boolean pcode, List abcList, String abcStr) throws IOException { for (int i = 0; i < script_info.length; i++) { String path = script_info[i].getPath(this); String packageName = path.substring(0, path.lastIndexOf(".")); @@ -523,7 +527,11 @@ public class ABC { if (packageName.equals("")) { path = path.substring(1); } - String exStr = "Exporting " + (i + 1) + "/" + script_info.length + " " + path + " ..."; + String cnt = ""; + if (script_info.length > 1) { + cnt = "script " + (i + 1) + "/" + script_info.length+" "; + } + String exStr = "Exporting " + abcStr + cnt + path + " ..."; informListeners("export", exStr); logger.info(exStr); File outDir = new File(directory + File.separatorChar + packageName.replace('.', File.separatorChar));