mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-27 05:44:51 +00:00
flash player zoom fix, html5 export fixed when framerate=0
This commit is contained in:
@@ -1435,13 +1435,18 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
fos.write(Utf8Helper.getBytes("\t" + currentName + "(ctx,ctrans,frames[frame],0,time);\r\n"));
|
||||
fos.write(Utf8Helper.getBytes("\tctx.restore();\r\n"));
|
||||
fos.write(Utf8Helper.getBytes("}\r\n\r\n"));
|
||||
fos.write(Utf8Helper.getBytes("window.setInterval(function(){nextFrame(ctx,ctrans);}," + (int) (1000.0 / ftim.swf.frameRate) + ");\r\n"));
|
||||
if (ftim.swf.frameRate > 0) {
|
||||
fos.write(Utf8Helper.getBytes("window.setInterval(function(){nextFrame(ctx,ctrans);}," + (int) (1000.0 / ftim.swf.frameRate) + ");\r\n"));
|
||||
}
|
||||
fos.write(Utf8Helper.getBytes("nextFrame(ctx,ctrans);\r\n"));
|
||||
}
|
||||
|
||||
boolean packed = false;
|
||||
if (Configuration.packJavaScripts.get()) {
|
||||
try {
|
||||
JPacker.main(new String[]{"-q", "-b", "62", "-o", fmin.getAbsolutePath(), f.getAbsolutePath()});
|
||||
f.delete();
|
||||
packed = true;
|
||||
} catch (Exception | Error e) { //Something wrong in the packer
|
||||
logger.log(Level.WARNING, "JPacker: Cannot minimize script");
|
||||
f.renameTo(fmin);
|
||||
@@ -1459,7 +1464,7 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
while ((cnt = fis.read(buf)) > 0) {
|
||||
fos.write(buf, 0, cnt);
|
||||
}
|
||||
if (Configuration.packJavaScripts.get()) {
|
||||
if (packed) {
|
||||
fos.write(Utf8Helper.getBytes(";"));
|
||||
}
|
||||
fos.write(Utf8Helper.getBytes(CanvasShapeExporter.getJsSuffix()));
|
||||
|
||||
@@ -781,7 +781,7 @@ public class ActionListReader {
|
||||
}
|
||||
|
||||
Action a;
|
||||
Scanner sc = new Scanner(System.in);
|
||||
Scanner sc = null;
|
||||
loopip:
|
||||
while (((endip == -1) || (endip > ip)) && (a = actions.get(ip)) != null) {
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
@@ -854,6 +854,9 @@ public class ActionListReader {
|
||||
if (decideBranch) {
|
||||
System.out.print("newip " + nip + ", ");
|
||||
System.out.print("Action: jump(j),ignore(i),compute(c)?");
|
||||
if (sc == null) {
|
||||
sc = new Scanner(System.in);
|
||||
}
|
||||
String next = sc.next();
|
||||
switch (next) {
|
||||
case "j":
|
||||
|
||||
@@ -143,7 +143,7 @@ public class Timeline {
|
||||
this.id = id;
|
||||
this.swf = swf;
|
||||
this.displayRect = displayRect;
|
||||
this.frameRate = swf.frameRate < 1 ? 1 : swf.frameRate;
|
||||
this.frameRate = swf.frameRate;
|
||||
this.timelined = parentTag == null ? swf : (Timelined) parentTag;
|
||||
this.parentTag = parentTag;
|
||||
this.tags = tags;
|
||||
|
||||
Reference in New Issue
Block a user