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; }
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(); }
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); }