Пример #1
0
 public DefineFontNameTag(FlashReader reader, TagRecord header) :
     base(reader, header)
 {
     FontId        = reader.ReadUInt16();
     FontName      = reader.ReadNullTerminatedString();
     FontCopyright = reader.ReadNullTerminatedString();
 }
Пример #2
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);
        }
Пример #3
0
        public ExportAssetsTag(FlashReader reader, TagRecord header) :
            base(reader, header)
        {
            int count = reader.ReadUInt16();

            Assets = new Dictionary <ushort, string>(count);

            for (int i = 0; i < count; i++)
            {
                ushort tag  = reader.ReadUInt16();
                string name = reader.ReadNullTerminatedString();

                if (Assets.ContainsKey(tag))
                {
                    throw new Exception(
                              "Duplicate tag id: " + tag);
                }
                Assets[tag] = name;
            }
        }
Пример #4
0
        public SymbolClassTag(FlashReader reader, TagRecord header) :
            base(reader, header)
        {
            int symbolCount = reader.ReadUInt16();

            Symbols = new Dictionary <ushort, string>(symbolCount);

            for (int i = 0; i < symbolCount; i++)
            {
                ushort characterId = reader.ReadUInt16();
                string symbolName  = reader.ReadNullTerminatedString();

                if (Symbols.ContainsKey(characterId))
                {
                    symbolName =
                        $"{Symbols[characterId]},{symbolName}";
                }
                Symbols[characterId] = symbolName;
            }
        }
Пример #5
0
 public FrameLabelTag(FlashReader reader, TagRecord header) :
     base(reader, header)
 {
     Name = reader.ReadNullTerminatedString();
 }