SoundInfo
Inheritance: ISwfSerializer
 /// <summary>
 /// Creates a new <see cref="DefineButtonSoundTag"/> instance.
 /// </summary>
 /// <param name="buttonId">Button id.</param>
 /// <param name="buttonSoundChar">Button sound char.</param>
 /// <param name="buttonSoundInfo">Button sound info.</param>
 /// <param name="buttonSoundChar1">Button sound char1.</param>
 /// <param name="buttonSoundInfo1">Button sound info1.</param>
 /// <param name="buttonSoundChar2">Button sound char2.</param>
 /// <param name="buttonSoundInfo2">Button sound info2.</param>
 /// <param name="buttonSoundChar3">Button sound char3.</param>
 /// <param name="buttonSoundInfo3">Button sound info3.</param>
 public DefineButtonSoundTag(ushort buttonId,
     ushort buttonSoundChar,
     SoundInfo buttonSoundInfo,
     ushort buttonSoundChar1,
     SoundInfo buttonSoundInfo1,
     ushort buttonSoundChar2,
     SoundInfo buttonSoundInfo2,
     ushort buttonSoundChar3,
     SoundInfo buttonSoundInfo3)
 {
     this.buttonId = buttonId;
     this.buttonSoundChar = buttonSoundChar;
     this.buttonSoundInfo = buttonSoundInfo;
     this.buttonSoundChar1 = buttonSoundChar1;
     this.buttonSoundInfo1 = buttonSoundInfo1;
     this.buttonSoundChar2 = buttonSoundChar2;
     this.buttonSoundInfo2 = buttonSoundInfo2;
     this.buttonSoundChar3 = buttonSoundChar3;
     this.buttonSoundInfo3 = buttonSoundInfo3;
     _tagCode = (int)TagCodeEnum.DefineButtonSound;
 }
示例#2
0
 /// <summary>
 /// Creates a new <see cref="StartSoundTag"/> instance.
 /// </summary>
 /// <param name="soundId">Sound id.</param>
 /// <param name="soundInfo">Sound info.</param>
 public StartSoundTag(ushort soundId, SoundInfo soundInfo)
 {
     this.soundId = soundId;
     this.soundInfo = soundInfo;
     this._tagCode = (int)TagCodeEnum.StartSound;
 }
        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();
            rh.ReadData(binaryReader);

            buttonId = binaryReader.ReadUInt16();

            buttonSoundChar = binaryReader.ReadUInt16();
            buttonSoundInfo = null;
            if (buttonSoundChar != 0)
            {
                buttonSoundInfo = new SoundInfo();
                buttonSoundInfo.ReadData(binaryReader);
            }
            buttonSoundChar1 = binaryReader.ReadUInt16();
            buttonSoundInfo1 = null;
            if (buttonSoundChar1 != 0)
            {
                buttonSoundInfo1 = new SoundInfo();
                buttonSoundInfo1.ReadData(binaryReader);
            }
            buttonSoundChar2 = binaryReader.ReadUInt16();
            buttonSoundInfo2 = null;
            if (buttonSoundChar2 != 0)
            {
                buttonSoundInfo2 = new SoundInfo();
                buttonSoundInfo2.ReadData(binaryReader);
            }
            buttonSoundChar3 = binaryReader.ReadUInt16();
            buttonSoundInfo3 = null;
            if (buttonSoundChar3 != 0)
            {
                buttonSoundInfo3 = new SoundInfo();
                buttonSoundInfo3.ReadData(binaryReader);
            }
        }
示例#4
0
        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();
            rh.ReadData(binaryReader);

            soundId = binaryReader.ReadUInt16();
            soundInfo = new SoundInfo();
            soundInfo.ReadData(binaryReader);
        }