Exemplo n.º 1
0
 public ButtonPart(ButtonRecord rec, FlashDocument doc)
 {
     Character = doc[rec.CharacterID];
     Depth = rec.CharacterDepth;
     Matrix = rec.CharacterMatrix;
     CxForm = rec.CxForm;
     Up = rec.Up;
     Over = rec.Over;
     Down = rec.Down;
 }
Exemplo n.º 2
0
        public void Load(SwfStream stream, uint length, byte version)
        {
            long end = length + stream.TagPosition;

            CharacterID = stream.ReadUShort();
            TrackAsMenu = (stream.ReadByte() & 0x01) != 0;
            ushort actionOffset = stream.ReadUShort();

            var type = GetType();
            var parts = new List<ButtonRecord>();
            bool ok;
            while (true)
            {
                var part = new ButtonRecord(stream, type, out ok);
                if (!ok) break;
                parts.Add(part);
            }
            Parts = parts.ToArray();

            var actions = new List<ButtonCondAction>();
            while (stream.TagPosition < end)
                actions.Add(new ButtonCondAction(stream));
            Actions = actions.ToArray();
        }
Exemplo n.º 3
0
        public void Load(SwfStream stream, uint length, byte version)
        {
            CharacterID = stream.ReadUShort();

            var type = GetType();
            var parts = new List<ButtonRecord>();
            bool ok;
            while (true)
            {
                var part = new ButtonRecord(stream, type, out ok);
                if (!ok) break;
                parts.Add(part);
            }
            Parts = parts.ToArray();
            Actions = ActionRecord.ReadActions(stream, null);
        }