#1194 Wrong sound effects in fla

This commit is contained in:
honfika@gmail.com
2016-03-20 17:26:50 +01:00
parent 2e00607632
commit 92518eb79f
2 changed files with 74 additions and 58 deletions

View File

@@ -90,6 +90,7 @@ import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import com.jpexs.decompiler.flash.tags.DebugIDTag;
import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag;
import com.jpexs.decompiler.flash.tags.DefineSoundTag;
import com.jpexs.decompiler.flash.tags.DefineSpriteTag;
import com.jpexs.decompiler.flash.tags.DoInitActionTag;
import com.jpexs.decompiler.flash.tags.EnableDebugger2Tag;
@@ -554,6 +555,19 @@ public final class SWF implements SWFContainerItem, Timelined {
return null;
}
public DefineSoundTag getSound(int soundId) {
CharacterTag characterTag = getCharacters().get(soundId);
if (characterTag instanceof DefineSoundTag) {
return (DefineSoundTag) characterTag;
}
if (characterTag != null) {
logger.log(Level.SEVERE, "CharacterTag should be a DefineSoundTag. characterId: {0}", soundId);
}
return null;
}
public TextTag getText(int textId) {
CharacterTag characterTag = getCharacters().get(textId);
if (characterTag instanceof TextTag) {