Added: Simple editor - add/remove frames in buttons

This commit is contained in:
Jindra Petřík
2025-05-17 17:03:59 +02:00
parent 5fecb497b4
commit b8c67a2bc3
10 changed files with 441 additions and 139 deletions
@@ -298,15 +298,21 @@ public class EasySwfPanel extends JPanel {
place.matrix = new MATRIX();
place.placeFlagHasMatrix = true;
place.setTimelined(timelined);
if (showFrameTag == null) {
timelined.addTag(place);
if (timelined instanceof ButtonTag) {
ButtonTag button = (ButtonTag) timelined;
button.getButtonRecordAt(fframe, newDepth, true).fromPlaceObject(place);
} else {
timelined.addTag(timelined.indexOfTag(showFrameTag), place);
if (showFrameTag == null) {
timelined.addTag(place);
} else {
timelined.addTag(timelined.indexOfTag(showFrameTag), place);
if (fframe < timelined.getFrameCount() - 1) {
RemoveObject2Tag remove = new RemoveObject2Tag(timelined.getSwf());
remove.depth = newDepth;
timelined.addTag(timelined.indexOfTag(showFrameTag) + 1, remove);
if (fframe < timelined.getFrameCount() - 1) {
RemoveObject2Tag remove = new RemoveObject2Tag(timelined.getSwf());
remove.depth = newDepth;
timelined.addTag(timelined.indexOfTag(showFrameTag) + 1, remove);
}
}
}