Example #1
0
        public static DefineBinaryDataTag Create(SwfStreamReader reader)
        {
            var tag = reader.ReadUInt16();

            reader.ReadUInt32();             // reserved
            var data = reader.ReadRest();

            return(new DefineBinaryDataTag {
                Tag = tag,
                Data = data
            });
        }
Example #2
0
        public static DoABCTag Create(SwfStreamReader reader)
        {
            const int kDoAbcLazyInitializeFlag = 1;
            var       flags     = reader.ReadUInt32();
            var       name      = reader.ReadString();
            var       abc_bytes = reader.ReadRest();

            return(new DoABCTag {
                ExecuteImmediately = (flags & kDoAbcLazyInitializeFlag) == 0,
                Name = name,
                ABCBytes = abc_bytes
            });
        }
Example #3
0
        public static DefineBitsLosslessTag Create(SwfStreamReader reader)
        {
            var tag = new DefineBitsLosslessTag();

            tag.CharacterId  = reader.ReadUInt16();
            tag.BitmapFormat = reader.ReadByte();
            tag.BitmapWidth  = reader.ReadUInt16();
            tag.BitmapHeight = reader.ReadUInt16();
            if (tag.BitmapFormat == 3)
            {
                tag.BitmapColorTableSize = (ushort)(reader.ReadByte() + 1);
            }
            tag.ZlibBitmapData = reader.ReadRest();
            return(tag);
        }