diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index e1d36d03c..9f6ce8f5d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -2199,11 +2199,16 @@ public class XFLConverter { ret += ""; ret += convertLabelsLayer(spriteId, tags, timelineTags, backgroundColor); - ret += convertActionScriptLayer(spriteId, tags, timelineTags, backgroundColor); + String scriptLayer = convertActionScriptLayer(spriteId, tags, timelineTags, backgroundColor); + int index = 0; + if(!scriptLayer.isEmpty()){ + index++; + } + ret += scriptLayer; int layerCount = getLayerCount(timelineTags); Stack parentLayers = new Stack<>(); - int index = 0; + for (int d = layerCount; d >= 1; d--, index++) { for (Tag t : timelineTags) { if (t instanceof PlaceObjectTypeTag) {