Fixed FLA export - Sprites which do not end with ShowFrame tag

This commit is contained in:
Jindra Petřík
2023-09-09 20:13:24 +02:00
parent 61b73c6db6
commit ee70e1e3bb
2 changed files with 8 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
- [#2052] Detection of switches based on notequal operator
- [#2073] Recalculating frameCount field in SWF header and DefineSprite after deleting frame
- Handling currently selected tags when using folder preview selection (Not working Replace button, etc.)
- FLA export - Sprites which do not end with ShowFrame tag
### Changed
- [#2070] String values inside SWF to XML export are backslash escaped

View File

@@ -3079,6 +3079,7 @@ public class XFLConverter {
Map<Integer, PlaceObjectTypeTag> depthToClipPlace = new HashMap<>();
Map<PlaceObjectTypeTag, Integer> clipFinishFrames = new HashMap<>();
Tag lastTag = null;
for (Tag t : timelineTags) {
if (t instanceof ShowFrameTag) {
f++;
@@ -3103,7 +3104,13 @@ public class XFLConverter {
depthToClipPlace.remove(re.getDepth());
}
}
lastTag = t;
}
//Some sprites do not end with ShowFrame:
if (lastTag != null && !(lastTag instanceof ShowFrameTag)) {
f++;
}
int frameCount = f;