Esempio n. 1
0
        public DefineButton(SwfReader r)
        {
            ButtonId = r.GetByte();
            while (r.PeekByte() != 0)
            {
                Characters.Add(new ButtonRecord(r, TagType.DefineButton));
            }
            r.GetByte();// 0, end ButtonRecords

            uint start = r.Position;

            ActionRecords          = new ActionRecords(r, int.MaxValue);
            ActionRecords.CodeSize = r.Position - start;
        }
Esempio n. 2
0
        public DefineTextTag(SwfReader r, bool useAlpha)
        {
            if (useAlpha)
            {
                tagType = TagType.DefineText2;
            }
            CharacterId = r.GetUI16();
            TextBounds = new Rect(r);
            TextMatrix = new Matrix(r);
            glyphBits = (uint)r.GetByte();
            advanceBits = (uint)r.GetByte();

            while (r.PeekByte() != 0x00)
            {
                TextRecords.Add(new TextRecord(r, glyphBits, advanceBits, useAlpha));
            }
            byte end = r.GetByte();
        }
Esempio n. 3
0
        public DefineTextTag(SwfReader r, bool useAlpha)
        {
            if (useAlpha)
            {
                tagType = TagType.DefineText2;
            }
            CharacterId = r.GetUI16();
            TextBounds  = new Rect(r);
            TextMatrix  = new Matrix(r);
            glyphBits   = (uint)r.GetByte();
            advanceBits = (uint)r.GetByte();

            while (r.PeekByte() != 0x00)
            {
                TextRecords.Add(new TextRecord(r, glyphBits, advanceBits, useAlpha));
            }
            byte end = r.GetByte();
        }
Esempio n. 4
0
        public DefineButton2(SwfReader r)
        {
            ButtonId = r.GetUI16();
            r.GetBits(7);
            TrackAsMenu  = r.GetBit();
            ActionOffset = r.GetUI16();

            while (r.PeekByte() != 0)
            {
                Characters.Add(new ButtonRecord(r, TagType.DefineButton2));
            }
            r.GetByte();// 0, end ButtonRecords

            if (ActionOffset > 0)
            {
                ButtonCondAction bca;
                do
                {
                    bca = new ButtonCondAction(r);
                    ButtonCondActions.Add(bca);
                }while (bca.CondActionSize > 0);
            }
        }
Esempio n. 5
0
        public DefineButton2(SwfReader r)
        {
            ButtonId = r.GetUI16();
            r.GetBits(7);
            TrackAsMenu = r.GetBit();
            ActionOffset = r.GetUI16();

            while (r.PeekByte() != 0)
            {
                Characters.Add(new ButtonRecord(r, TagType.DefineButton2));
            }
            r.GetByte();// 0, end ButtonRecords

            if (ActionOffset > 0)
            {
                ButtonCondAction bca;
                do
                {
                    bca = new ButtonCondAction(r);
                    ButtonCondActions.Add(bca);
                }
                while (bca.CondActionSize > 0);
            }
        }