AS3: counting tags during export

This commit is contained in:
Jindra Petk
2012-12-30 20:48:45 +01:00
parent 30337c38c8
commit 3eb247bbc8
2 changed files with 15 additions and 3 deletions

View File

@@ -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) {

View File

@@ -516,6 +516,10 @@ public class ABC {
}
public void export(String directory, boolean pcode, List<DoABCTag> abcList) throws IOException {
export(directory, pcode, abcList, "");
}
public void export(String directory, boolean pcode, List<DoABCTag> 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));