Fixed: Buttons were not active where they should be

This commit is contained in:
Jindra Petřík
2024-11-10 19:50:55 +01:00
parent 32f8608d76
commit 4d3dc74597
8 changed files with 50 additions and 47 deletions
+1
View File
@@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
- [#2357] FLA export to CS4 and lower - files exceeding 0x7FFF objects limit - [#2357] FLA export to CS4 and lower - files exceeding 0x7FFF objects limit
- [#2357] FLA export to CS4 and lower - speed optimization - [#2357] FLA export to CS4 and lower - speed optimization
- [#2362] Generating error log ExecutionException - InterruptedException log on switching flash/air swc - [#2362] Generating error log ExecutionException - InterruptedException log on switching flash/air swc
- Buttons were not active where they should be
### Changed ### Changed
- [#1619] Default thread count is set to 0 ( = auto) - [#1619] Default thread count is set to 0 ( = auto)
@@ -532,7 +532,7 @@ public class EasySwfPanel extends JPanel {
if (obj instanceof Tag) { if (obj instanceof Tag) {
Tag t = (Tag) obj; Tag t = (Tag) obj;
libraryPreviewPanel.setTimelined(TimelinedMaker.makeTimelined(t), t.getSwf(), libraryPreviewPanel.setTimelined(TimelinedMaker.makeTimelined(t), t.getSwf(),
-1, false, true, true, true, true, false, true); -1, false, true, true, true, true, false, true, true);
libraryPreviewPanel.zoomFit(); libraryPreviewPanel.zoomFit();
} else { } else {
libraryPreviewPanel.clearAll(); libraryPreviewPanel.clearAll();
@@ -579,7 +579,7 @@ public class EasySwfPanel extends JPanel {
libraryTreeTable.setSwf(swf); libraryTreeTable.setSwf(swf);
libraryPreviewPanel.clearAll(); libraryPreviewPanel.clearAll();
if (updateStage) { if (updateStage) {
stagePanel.setTimelined(timelined, swf, 0, true, true, true, true, true, false, true); stagePanel.setTimelined(timelined, swf, 0, true, true, true, true, true, false, true, true);
stagePanel.pause(); stagePanel.pause();
stagePanel.gotoFrame(0); stagePanel.gotoFrame(0);
} }
@@ -47,10 +47,7 @@ import com.jpexs.decompiler.flash.timeline.Frame;
import com.jpexs.decompiler.flash.timeline.Timeline; import com.jpexs.decompiler.flash.timeline.Timeline;
import com.jpexs.decompiler.flash.timeline.Timelined; import com.jpexs.decompiler.flash.timeline.Timelined;
import com.jpexs.decompiler.flash.types.BUTTONCONDACTION; import com.jpexs.decompiler.flash.types.BUTTONCONDACTION;
import com.jpexs.decompiler.flash.types.CXFORMWITHALPHA;
import com.jpexs.decompiler.flash.types.ColorTransform;
import com.jpexs.decompiler.flash.types.ConstantColorColorTransform; import com.jpexs.decompiler.flash.types.ConstantColorColorTransform;
import com.jpexs.decompiler.flash.types.MATRIX;
import com.jpexs.decompiler.flash.types.RECT; import com.jpexs.decompiler.flash.types.RECT;
import com.jpexs.decompiler.flash.types.RGB; import com.jpexs.decompiler.flash.types.RGB;
import com.jpexs.decompiler.flash.types.SOUNDINFO; import com.jpexs.decompiler.flash.types.SOUNDINFO;
@@ -105,7 +102,6 @@ import java.io.IOException;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -264,6 +260,8 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
private boolean frozen = false; private boolean frozen = false;
private boolean frozenButtons = false;
private boolean muted = false; private boolean muted = false;
private boolean resample = false; private boolean resample = false;
@@ -330,6 +328,10 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
private final List<Timelined> parentTimelineds = new ArrayList<>(); private final List<Timelined> parentTimelineds = new ArrayList<>();
public void setFrozenButtons(boolean frozenButtons) {
this.frozenButtons = frozenButtons;
}
public boolean isMultiSelect() { public boolean isMultiSelect() {
return multiSelect; return multiSelect;
} }
@@ -2572,7 +2574,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
lastMouseEvent = e; lastMouseEvent = e;
redraw(); redraw();
ButtonTag button = iconPanel.mouseOverButton; ButtonTag button = iconPanel.mouseOverButton;
if (button != null && !doFreeTransform && !frozen) { if (button != null && !doFreeTransform && !frozenButtons) {
DefineButtonSoundTag sounds = button.getSounds(); DefineButtonSoundTag sounds = button.getSounds();
if (!muted && sounds != null && sounds.buttonSoundChar2 != 0) { // OverUpToOverDown if (!muted && sounds != null && sounds.buttonSoundChar2 != 0) { // OverUpToOverDown
CharacterTag soundCharTag = swf.getCharacter(sounds.buttonSoundChar2); CharacterTag soundCharTag = swf.getCharacter(sounds.buttonSoundChar2);
@@ -2617,7 +2619,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
lastMouseEvent = e; lastMouseEvent = e;
redraw(); redraw();
ButtonTag button = iconPanel.mouseOverButton; ButtonTag button = iconPanel.mouseOverButton;
if (!muted && button != null && !doFreeTransform && !frozen) { if (!muted && button != null && !doFreeTransform && !frozenButtons) {
DefineButtonSoundTag sounds = button.getSounds(); DefineButtonSoundTag sounds = button.getSounds();
if (sounds != null && sounds.buttonSoundChar3 != 0) { // OverDownToOverUp if (sounds != null && sounds.buttonSoundChar3 != 0) { // OverDownToOverUp
CharacterTag soundCharTag = swf.getCharacter(sounds.buttonSoundChar3); CharacterTag soundCharTag = swf.getCharacter(sounds.buttonSoundChar3);
@@ -2891,7 +2893,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
private Timer setTimelinedTimer = null; private Timer setTimelinedTimer = null;
public void setTimelined(final Timelined drawable, final SWF swf, int frame, boolean showObjectsUnderCursor, boolean autoPlay, boolean frozen, boolean alwaysDisplay, boolean muted, boolean mutable, boolean allowZoom) { public void setTimelined(final Timelined drawable, final SWF swf, int frame, boolean showObjectsUnderCursor, boolean autoPlay, boolean frozen, boolean alwaysDisplay, boolean muted, boolean mutable, boolean allowZoom, boolean frozenButtons) {
Stage stage = new Stage(drawable) { Stage stage = new Stage(drawable) {
@Override @Override
public void callFrame(int frame) { public void callFrame(int frame) {
@@ -2999,6 +3001,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
autoPlayed = autoPlay; autoPlayed = autoPlay;
this.alwaysDisplay = alwaysDisplay; this.alwaysDisplay = alwaysDisplay;
this.frozen = frozen; this.frozen = frozen;
this.frozenButtons = frozenButtons;
this.muted = muted; this.muted = muted;
this.resample = Configuration.previewResampleSound.get(); this.resample = Configuration.previewResampleSound.get();
this.mutable = mutable; this.mutable = mutable;
@@ -3588,7 +3591,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
renderContext.mouseButton = mouseButton; renderContext.mouseButton = mouseButton;
renderContext.stateUnderCursor = new ArrayList<>(); renderContext.stateUnderCursor = new ArrayList<>();
renderContext.enableButtons = !frozen; renderContext.enableButtons = !frozenButtons;
SerializableImage img; SerializableImage img;
try { try {
@@ -3758,7 +3761,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
} }
} }
boolean handCursor = renderContext.mouseOverButton != null || !autoPlayed && !frozen; boolean handCursor = renderContext.mouseOverButton != null || !autoPlayed && !frozenButtons;
if (showObjectsUnderCursor && autoPlayed) { if (showObjectsUnderCursor && autoPlayed) {
@@ -5836,7 +5836,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
if (treeItem instanceof SWF) { if (treeItem instanceof SWF) {
SWF swf = (SWF) treeItem; SWF swf = (SWF) treeItem;
if (internalViewer) { if (internalViewer) {
previewPanel.showImagePanel(swf, swf, -1, true, Configuration.autoPlaySwfs.get() && Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel(swf, swf, -1, true, Configuration.autoPlaySwfs.get() && Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else { } else {
previewPanel.setParametersPanelVisible(false); previewPanel.setParametersPanelVisible(false);
previewPanel.showFlashViewerPanel(); previewPanel.showFlashViewerPanel();
@@ -5868,8 +5868,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
ImageTag imageTag = (ImageTag) treeItem; ImageTag imageTag = (ImageTag) treeItem;
previewPanel.setImageReplaceButtonVisible(!((Tag) imageTag).isReadOnly() && imageTag.importSupported(), imageTag instanceof DefineBitsJPEG3Tag || imageTag instanceof DefineBitsJPEG4Tag, false, false, false, false, false); previewPanel.setImageReplaceButtonVisible(!((Tag) imageTag).isReadOnly() && imageTag.importSupported(), imageTag instanceof DefineBitsJPEG3Tag || imageTag instanceof DefineBitsJPEG4Tag, false, false, false, false, false);
SWF imageSWF = TimelinedMaker.makeTimelinedImage(imageTag); SWF imageSWF = TimelinedMaker.makeTimelinedImage(imageTag);
previewPanel.showImagePanel(imageSWF, imageSWF, 0, false, true, true, true, true, false, false, true); previewPanel.showImagePanel(imageSWF, imageSWF, 0, false, true, true, true, true, false, false, true, true);
} else if (!isVideoButNotDrawable && (treeItem instanceof DrawableTag) && (!(treeItem instanceof TextTag)) && (!(treeItem instanceof FontTag)) && internalViewer) { } else if (!isVideoButNotDrawable && (treeItem instanceof DrawableTag) && (!(treeItem instanceof TextTag)) && (!(treeItem instanceof FontTag)) && internalViewer) {
final Tag tag = (Tag) treeItem; final Tag tag = (Tag) treeItem;
DrawableTag d = (DrawableTag) tag; DrawableTag d = (DrawableTag) tag;
@@ -5890,11 +5889,11 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
if (treeItem instanceof DefineSpriteTag) { if (treeItem instanceof DefineSpriteTag) {
previewPanel.setImageReplaceButtonVisible(false, false, false, false, false, false, !((Tag) treeItem).isReadOnly()); previewPanel.setImageReplaceButtonVisible(false, false, false, false, false, false, !((Tag) treeItem).isReadOnly());
} }
previewPanel.showImagePanel(timelined, tag.getSwf(), -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get() && !(treeItem instanceof ButtonTag), treeItem instanceof ShapeTag, !Configuration.playFrameSounds.get(), (treeItem instanceof DefineSpriteTag) || (treeItem instanceof ButtonTag), (treeItem instanceof DefineSpriteTag) || (treeItem instanceof ButtonTag) || (treeItem instanceof ShapeTag), true); previewPanel.showImagePanel(timelined, tag.getSwf(), -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get() && !(treeItem instanceof ButtonTag), treeItem instanceof ShapeTag, !Configuration.playFrameSounds.get(), (treeItem instanceof DefineSpriteTag) || (treeItem instanceof ButtonTag), (treeItem instanceof DefineSpriteTag) || (treeItem instanceof ButtonTag) || (treeItem instanceof ShapeTag), true, false);
} else if (treeItem instanceof Frame && internalViewer) { } else if (treeItem instanceof Frame && internalViewer) {
Frame fn = (Frame) treeItem; Frame fn = (Frame) treeItem;
SWF swf = (SWF) fn.getOpenable(); SWF swf = (SWF) fn.getOpenable();
previewPanel.showImagePanel(fn.timeline.timelined, swf, fn.frame, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel(fn.timeline.timelined, swf, fn.frame, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else if (treeItem instanceof ShowFrameTag) { } else if (treeItem instanceof ShowFrameTag) {
SWF swf; SWF swf;
if (timelinedContainer instanceof DefineSpriteTag) { if (timelinedContainer instanceof DefineSpriteTag) {
@@ -5902,7 +5901,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
} else { } else {
swf = (SWF) timelinedContainer; swf = (SWF) timelinedContainer;
} }
previewPanel.showImagePanel(timelinedContainer, swf, frame, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel(timelinedContainer, swf, frame, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else if ((treeItem instanceof SoundTag)) { //&& isInternalFlashViewerSelected() && (Arrays.asList("mp3", "wav").contains(((SoundTag) tagObj).getExportFormat())))) { } else if ((treeItem instanceof SoundTag)) { //&& isInternalFlashViewerSelected() && (Arrays.asList("mp3", "wav").contains(((SoundTag) tagObj).getExportFormat())))) {
previewPanel.showImagePanel(new SerializableImage(View.loadImage("sound32"))); previewPanel.showImagePanel(new SerializableImage(View.loadImage("sound32")));
previewPanel.setImageReplaceButtonVisible(false, false, false, !((SoundTag) treeItem).isReadOnly() && ((SoundTag) treeItem).importSupported(), false, false, false); previewPanel.setImageReplaceButtonVisible(false, false, false, !((SoundTag) treeItem).isReadOnly() && ((SoundTag) treeItem).importSupported(), false, false, false);
@@ -6034,7 +6033,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
return getRect(); return getRect();
} }
}; };
previewPanel.showImagePanel(tim, origSwf, 0, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel(tim, origSwf, 0, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, true);
} else if (treeItem instanceof DefineFont4Tag) { } else if (treeItem instanceof DefineFont4Tag) {
previewPanel.showGenericTagPanel((Tag) treeItem); previewPanel.showGenericTagPanel((Tag) treeItem);
} else { } else {
@@ -1689,7 +1689,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
showCardLeft(FLASH_VIEWER_CARD); showCardLeft(FLASH_VIEWER_CARD);
} }
public void showImagePanel(Timelined timelined, SWF swf, int frame, boolean showObjectsUnderCursor, boolean autoPlay, boolean frozen, boolean alwaysDisplay, boolean muted, boolean mutable, boolean allowFreeTransform, boolean allowZoom) { public void showImagePanel(Timelined timelined, SWF swf, int frame, boolean showObjectsUnderCursor, boolean autoPlay, boolean frozen, boolean alwaysDisplay, boolean muted, boolean mutable, boolean allowFreeTransform, boolean allowZoom, boolean frozenButtons) {
showCardLeft(DRAW_PREVIEW_CARD); showCardLeft(DRAW_PREVIEW_CARD);
parametersPanel.setVisible(false); parametersPanel.setVisible(false);
imagePlayControls.setMedia(imagePanel); imagePlayControls.setMedia(imagePanel);
@@ -1699,7 +1699,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
} }
imageTransformSaveButton.setVisible(false); imageTransformSaveButton.setVisible(false);
imageTransformCancelButton.setVisible(false); imageTransformCancelButton.setVisible(false);
imagePanel.setTimelined(timelined, swf, frame, showObjectsUnderCursor, autoPlay, frozen, alwaysDisplay, muted, mutable, allowZoom); imagePanel.setTimelined(timelined, swf, frame, showObjectsUnderCursor, autoPlay, frozen, alwaysDisplay, muted, mutable, allowZoom, frozenButtons);
} }
public void showImagePanel(SerializableImage image) { public void showImagePanel(SerializableImage image) {
@@ -1738,7 +1738,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
private void showFontPage(FontTag fontTag) { private void showFontPage(FontTag fontTag) {
if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) { if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
showImagePanel(TimelinedMaker.makeTimelined(fontTag), fontTag.getSwf(), fontPageNum, true, true, true, true, true, false, false, false); showImagePanel(TimelinedMaker.makeTimelined(fontTag), fontTag.getSwf(), fontPageNum, true, true, true, true, true, false, false, false, true);
} }
} }
@@ -1757,7 +1757,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
public void showTextPanel(TextTag textTag) { public void showTextPanel(TextTag textTag) {
if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) { if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
showImagePanel(TimelinedMaker.makeTimelined(textTag), textTag.getSwf(), 0, true, true, true, true, true, false, false, true); showImagePanel(TimelinedMaker.makeTimelined(textTag), textTag.getSwf(), 0, true, true, true, true, true, false, false, true, true);
} }
showCardRight(CARDTEXTPANEL); showCardRight(CARDTEXTPANEL);
@@ -2020,16 +2020,16 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
displayEditImagePanel.selectDepth(-1); displayEditImagePanel.selectDepth(-1);
if (tag instanceof ShapeTag) { if (tag instanceof ShapeTag) {
Timelined tim = TimelinedMaker.makeTimelined(tag); Timelined tim = TimelinedMaker.makeTimelined(tag);
displayEditImagePanel.setTimelined(tim, ((Tag) tag).getSwf(), 0, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true); displayEditImagePanel.setTimelined(tim, ((Tag) tag).getSwf(), 0, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true, true);
} }
if (tag instanceof MorphShapeTag) { if (tag instanceof MorphShapeTag) {
Timelined tim = TimelinedMaker.makeTimelined(tag); Timelined tim = TimelinedMaker.makeTimelined(tag);
displayEditImagePanel.setTimelined(tim, ((Tag) tag).getSwf(), -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true); displayEditImagePanel.setTimelined(tim, ((Tag) tag).getSwf(), -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true, true);
morphDisplayMode = MORPH_ANIMATE; morphDisplayMode = MORPH_ANIMATE;
displayEditShowAnimationButton.setSelected(true); displayEditShowAnimationButton.setSelected(true);
} }
if (tag instanceof PlaceObjectTypeTag) { if (tag instanceof PlaceObjectTypeTag) {
displayEditImagePanel.setTimelined(((Tag) tag).getTimelined(), ((Tag) tag).getSwf(), frame, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, true); displayEditImagePanel.setTimelined(((Tag) tag).getTimelined(), ((Tag) tag).getSwf(), frame, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, true, true);
PlaceObjectTypeTag place = (PlaceObjectTypeTag) tag; PlaceObjectTypeTag place = (PlaceObjectTypeTag) tag;
displayEditImagePanel.selectDepth(place.getDepth()); displayEditImagePanel.selectDepth(place.getDepth());
} }
@@ -2710,19 +2710,19 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
private void showAnimationDisplayEditTagButtonActionPerformed(ActionEvent evt) { private void showAnimationDisplayEditTagButtonActionPerformed(ActionEvent evt) {
morphDisplayMode = MORPH_ANIMATE; morphDisplayMode = MORPH_ANIMATE;
Timelined tim = TimelinedMaker.makeTimelined(displayEditTag); Timelined tim = TimelinedMaker.makeTimelined(displayEditTag);
displayEditImagePanel.setTimelined(tim, displayEditTag.getSwf(), -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true); displayEditImagePanel.setTimelined(tim, displayEditTag.getSwf(), -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true, true);
} }
private void showStartDisplayEditTagButtonActionPerformed(ActionEvent evt) { private void showStartDisplayEditTagButtonActionPerformed(ActionEvent evt) {
morphDisplayMode = MORPH_START; morphDisplayMode = MORPH_START;
Timelined tim = TimelinedMaker.makeTimelined(displayEditTag); Timelined tim = TimelinedMaker.makeTimelined(displayEditTag);
displayEditImagePanel.setTimelined(tim, displayEditTag.getSwf(), 0, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true); displayEditImagePanel.setTimelined(tim, displayEditTag.getSwf(), 0, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true, true);
} }
private void showEndDisplayEditTagButtonActionPerformed(ActionEvent evt) { private void showEndDisplayEditTagButtonActionPerformed(ActionEvent evt) {
morphDisplayMode = MORPH_END; morphDisplayMode = MORPH_END;
Timelined tim = TimelinedMaker.makeTimelined(displayEditTag); Timelined tim = TimelinedMaker.makeTimelined(displayEditTag);
displayEditImagePanel.setTimelined(tim, displayEditTag.getSwf(), tim.getFrameCount() - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true); displayEditImagePanel.setTimelined(tim, displayEditTag.getSwf(), tim.getFrameCount() - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), false, true, true);
} }
private void editPointsDisplayEditTagButtonActionPerformed(ActionEvent evt) { private void editPointsDisplayEditTagButtonActionPerformed(ActionEvent evt) {
@@ -3064,7 +3064,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
} }
}; };
imagePanel.setTimelined(tim, origSwf, 0, true, true, true, true, true, false, true); imagePanel.setTimelined(tim, origSwf, 0, true, true, true, true, true, false, true, true);
imagePanel.selectDepth(-1); imagePanel.selectDepth(-1);
replaceSpriteButton.setVisible(false); replaceSpriteButton.setVisible(false);
@@ -3176,7 +3176,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
int pageCount = getFontPageCount(fontTag); int pageCount = getFontPageCount(fontTag);
fontPageNum = (fontPageNum + pageCount - 1) % pageCount; fontPageNum = (fontPageNum + pageCount - 1) % pageCount;
if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) { if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
imagePanel.setTimelined(TimelinedMaker.makeTimelined(fontTag, fontPageNum), fontTag.getSwf(), 0, true, true, true, true, true, false, false); imagePanel.setTimelined(TimelinedMaker.makeTimelined(fontTag, fontPageNum), fontTag.getSwf(), 0, true, true, true, true, true, false, false, true);
} }
} }
@@ -3185,7 +3185,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
int pageCount = getFontPageCount(fontTag); int pageCount = getFontPageCount(fontTag);
fontPageNum = (fontPageNum + 1) % pageCount; fontPageNum = (fontPageNum + 1) % pageCount;
if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) { if (!MainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
imagePanel.setTimelined(TimelinedMaker.makeTimelined(fontTag, fontPageNum), fontTag.getSwf(), 0, true, true, true, true, true, false, false); imagePanel.setTimelined(TimelinedMaker.makeTimelined(fontTag, fontPageNum), fontTag.getSwf(), 0, true, true, true, true, true, false, false, true);
} }
} }
@@ -493,9 +493,9 @@ public class SelectFramePositionDialog extends AppDialog {
int f = ((MyFrame) tnode.getData()).frame; int f = ((MyFrame) tnode.getData()).frame;
Object parent = ((MyTreeNode) tnode.getParent()).getData(); Object parent = ((MyTreeNode) tnode.getParent()).getData();
if (parent instanceof DefineSpriteTag) { if (parent instanceof DefineSpriteTag) {
previewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else { } else {
previewPanel.showImagePanel(swf, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel(swf, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} }
} else { } else {
previewPanel.showEmpty(); previewPanel.showEmpty();
@@ -493,9 +493,9 @@ public class SelectTagPositionDialog extends AppDialog {
int f = ((MyFrame) tnode.getData()).frame; int f = ((MyFrame) tnode.getData()).frame;
Object parent = ((MyTreeNode) tnode.getParent()).getData(); Object parent = ((MyTreeNode) tnode.getParent()).getData();
if (parent instanceof DefineSpriteTag) { if (parent instanceof DefineSpriteTag) {
previewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else { } else {
previewPanel.showImagePanel(swf, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); previewPanel.showImagePanel(swf, swf, f - 1, true, true, !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} }
} else { } else {
previewPanel.showEmpty(); previewPanel.showEmpty();
@@ -732,22 +732,22 @@ public class AddScriptDialog extends AppDialog {
int f = ((MyFrame) ((MyTreeNode) tnode.getParent()).getData()).frame; int f = ((MyFrame) ((MyTreeNode) tnode.getParent()).getData()).frame;
Object parent = ((MyTreeNode) tnode.getParent().getParent()).getData(); Object parent = ((MyTreeNode) tnode.getParent().getParent()).getData();
if (parent instanceof DefineSpriteTag) { if (parent instanceof DefineSpriteTag) {
instancePreviewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); instancePreviewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else { } else {
instancePreviewPanel.showImagePanel(swf, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); instancePreviewPanel.showImagePanel(swf, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} }
} else if (tnode.getData() instanceof DefineSpriteTag) { } else if (tnode.getData() instanceof DefineSpriteTag) {
instancePreviewPanel.selectImageDepth(-1); instancePreviewPanel.selectImageDepth(-1);
instancePreviewPanel.showImagePanel((DefineSpriteTag) tnode.getData(), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); instancePreviewPanel.showImagePanel((DefineSpriteTag) tnode.getData(), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else if (tnode.getData() instanceof MyFrame) { } else if (tnode.getData() instanceof MyFrame) {
instancePreviewPanel.selectImageDepth(-1); instancePreviewPanel.selectImageDepth(-1);
int f = ((MyFrame) tnode.getData()).frame; int f = ((MyFrame) tnode.getData()).frame;
Object parent = ((MyTreeNode) tnode.getParent()).getData(); Object parent = ((MyTreeNode) tnode.getParent()).getData();
if (parent instanceof DefineSpriteTag) { if (parent instanceof DefineSpriteTag) {
instancePreviewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); instancePreviewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else { } else {
instancePreviewPanel.showImagePanel(swf, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); instancePreviewPanel.showImagePanel(swf, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} }
} }
checkEnabled(); checkEnabled();
@@ -761,7 +761,7 @@ public class AddScriptDialog extends AppDialog {
checkEnabled(); checkEnabled();
return; return;
} }
spriteInitPreviewPanel.showImagePanel(spriteInitList.getSelectedValue(), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); spriteInitPreviewPanel.showImagePanel(spriteInitList.getSelectedValue(), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
checkEnabled(); checkEnabled();
} }
@@ -773,7 +773,7 @@ public class AddScriptDialog extends AppDialog {
checkEnabled(); checkEnabled();
return; return;
} }
framePreviewPanel.showImagePanel(swf, swf, selectedIndex, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); framePreviewPanel.showImagePanel(swf, swf, selectedIndex, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
int f = selectedIndex + 1; int f = selectedIndex + 1;
if (!frameTextField.getText().equals("" + f)) { if (!frameTextField.getText().equals("" + f)) {
@@ -785,7 +785,7 @@ public class AddScriptDialog extends AppDialog {
private void buttonValueChanged(ListSelectionEvent e) { private void buttonValueChanged(ListSelectionEvent e) {
buttonPreviewPanel.showEmpty(); buttonPreviewPanel.showEmpty();
if (buttonList.getSelectedIndex() >= 0) { if (buttonList.getSelectedIndex() >= 0) {
buttonPreviewPanel.showImagePanel(TimelinedMaker.makeTimelined(buttonList.getSelectedValue()), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); buttonPreviewPanel.showImagePanel(TimelinedMaker.makeTimelined(buttonList.getSelectedValue()), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} }
checkEnabled(); checkEnabled();
@@ -801,14 +801,14 @@ public class AddScriptDialog extends AppDialog {
} }
MyTreeNode tnode = (MyTreeNode) selection.getLastPathComponent(); MyTreeNode tnode = (MyTreeNode) selection.getLastPathComponent();
if (tnode.getData() instanceof DefineSpriteTag) { if (tnode.getData() instanceof DefineSpriteTag) {
spriteFramePreviewPanel.showImagePanel((DefineSpriteTag) tnode.getData(), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); spriteFramePreviewPanel.showImagePanel((DefineSpriteTag) tnode.getData(), swf, -1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else if (tnode.getData() instanceof MyFrame) { } else if (tnode.getData() instanceof MyFrame) {
int f = ((MyFrame) tnode.getData()).frame; int f = ((MyFrame) tnode.getData()).frame;
Object parent = ((MyTreeNode) tnode.getParent()).getData(); Object parent = ((MyTreeNode) tnode.getParent()).getData();
if (parent instanceof DefineSpriteTag) { if (parent instanceof DefineSpriteTag) {
spriteFramePreviewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); spriteFramePreviewPanel.showImagePanel((DefineSpriteTag) parent, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} else { } else {
spriteFramePreviewPanel.showImagePanel(swf, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true); spriteFramePreviewPanel.showImagePanel(swf, swf, f - 1, true, Configuration.autoPlayPreviews.get(), !Configuration.animateSubsprites.get(), false, !Configuration.playFrameSounds.get(), true, false, true, false);
} }
if (!spriteFrameTextField.getText().equals("" + f)) { if (!spriteFrameTextField.getText().equals("" + f)) {
spriteFrameTextField.setText("" + f); spriteFrameTextField.setText("" + f);