From f125c311f9567d91c54130a5714eb9f851d869a3 Mon Sep 17 00:00:00 2001 From: bagdenisov Date: Mon, 6 Dec 2021 08:29:59 +0500 Subject: [PATCH] Fixed Incorrect position in Flash Player preview and SWF export --- CHANGELOG.md | 1 + .../com/jpexs/decompiler/flash/exporters/PreviewExporter.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 201b554d2..f2575d602 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file. - AS3 - direct editation - call on local register - AS3 - direct editation - resolve properties and local regs before types - AS3 - direct editation - call on index +- Incorrect position in Flash Player preview and SWF export ## [15.0.0] - 2021-11-29 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/PreviewExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/PreviewExporter.java index 5bf29bebb..ca5480541 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/PreviewExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/PreviewExporter.java @@ -435,8 +435,8 @@ public class PreviewExporter { RECT r = ((BoundedTag) treeItem).getRect(); rxmin = r.Xmin; rymin = r.Ymin; - /*mat.translateX = -r.Xmin; - mat.translateY = -r.Ymin;*/ + mat.translateX = -r.Xmin; + mat.translateY = -r.Ymin; mat.translateX = mat.translateX + width / 2 - r.getWidth() / 2; mat.translateY = mat.translateY + (showControls ? height - progressBarHeight * 20 : height) / 2 - r.getHeight() / 2; } else {