diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java index 658d2469b..e53171713 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java @@ -187,6 +187,10 @@ public class Timeline { int cnt = 1; for (int i = 1; i < frames.size(); i++) { + if (!frames.get(i).actions.isEmpty()) { + cnt++; + continue; + } if (frames.get(i).layersChanged) { cnt++; } diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index 801dbbd50..7f8bd2288 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -583,7 +583,9 @@ public final class ImagePanel extends JPanel implements MediaDisplay { @Override public void trace(Object... val) { - //TODO + for (Object o : val) { + System.out.println("trace:" + o.toString()); + } } }; @@ -858,16 +860,22 @@ public final class ImagePanel extends JPanel implements MediaDisplay { if (lda == null) { return Undefined.INSTANCE; } + long ip = sis.getPos(); + Action a; while ((a = sis.readAction()) != null) { + int actionLengthWithHeader = a.getTotalActionLength(); a.setAddress(sis.getPos()); a.execute(lda); if (lda.returnValue != null) { return lda.returnValue; } if (lda.jump != null) { - sis.seek(lda.jump); + ip = lda.jump; + } else { + ip += actionLengthWithHeader; } + sis.seek(ip); } return Undefined.INSTANCE; } @@ -887,7 +895,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay { try { ByteArrayRange actionBytes = src.getActionBytes(); int prevLength = actionBytes.getPos(); - SWFInputStream rri = new SWFInputStream(swf, actionBytes.getArray()); + SWFInputStream rri = new SWFInputStream(swf, actionBytes.getArray(), 0, prevLength + actionBytes.getLength()); if (prevLength != 0) { rri.seek(prevLength); }