Exemplo n.º 1
0
        public ProductInfoTag(FlashReader reader, TagRecord header) :
            base(reader, header)
        {
            ProductId = (FlashProductId)reader.ReadUInt32();
            Edition = (FlashEdition)reader.ReadUInt32();

            MajorVersion = reader.ReadByte();
            MinorVersion = reader.ReadByte();

            BuildLow = reader.ReadUInt32();
            BuildHigh = reader.ReadUInt32();

            CompilationDate =
                _epoch.AddMilliseconds(reader.ReadUInt64());
        }
Exemplo n.º 2
0
        public DefineBinaryDataTag(FlashReader reader, TagRecord header)
            : base(reader, header)
        {
            CharacterId = reader.ReadUInt16();
            reader.ReadUInt32();

            BinaryData = reader.ReadBytes(header.Body.Length - 6);
        }
Exemplo n.º 3
0
        public DoABCTag(FlashReader reader, TagRecord header)
            : base(reader, header)
        {
            Flags = reader.ReadUInt32();
            Name = reader.ReadNullTerminatedString();

            int nameLength = (Encoding.UTF8.GetByteCount(Name) + 1);
            byte[] abcData = reader.ReadBytes(header.Body.Length - (nameLength + 4));

            ABC = new ABCFile(abcData);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShockwaveFlash"/> class based on the specified array of bytes.
        /// </summary>
        /// <param name="data">The data containing the raw Shockwave Flash(SWF) file.</param>
        public ShockwaveFlash(byte[] data)
        {
            _flashData = data;

            Reader = new FlashReader(data);
            Tags = new List<FlashTag>();
            Dictionary = new FlashDictionary();

            Signature = Reader.ReadString(3);
            CompressWith = (CompressionStandard)Signature[0];

            Version = Reader.ReadByte();
            FileLength = Reader.ReadUInt32();

            if (CompressWith ==
                CompressionStandard.None)
            {
                ReadFrameInformation();
            }
            else IsCompressed = true;
        }