public ClipActions(SwfReader r, bool isSwf6Plus) { r.GetUI16(); // reserved ClipEvents = (ClipEvents)r.GetBits(32); ClipActionRecords = new List<ClipActionRecord>(); bool hasMoreRecords = true; while (hasMoreRecords) { ClipActionRecord car = new ClipActionRecord(r, isSwf6Plus); ClipActionRecords.Add(car); if ((uint)car.ClipEvents == 0) { hasMoreRecords = false; } } }
internal ClipActions(SwfReader r, bool isSwf6Plus) { r.GetUI16(); // reserved ClipEvents = (ClipEvents)r.GetBits(32); ClipActionRecords = new List <ClipActionRecord>(); bool hasMoreRecords = true; while (hasMoreRecords) { ClipActionRecord car = new ClipActionRecord(r, isSwf6Plus); ClipActionRecords.Add(car); if ((uint)car.ClipEvents == 0) { hasMoreRecords = false; } } }
public ClipActionRecord(SwfReader r, bool isSwf6Plus) { uint highClip = r.GetBits(16) << 16; uint lowClip = 0; bool isEndRecord = false; if (highClip == 0) { if (isSwf6Plus) { lowClip = r.GetBits(16); if (lowClip == 0) { ClipEvents = (ClipEvents)0; ActionRecordSize = 4; isEndRecord = true; } } else { ClipEvents = (ClipEvents)0; ActionRecordSize = 2; isEndRecord = true; } } else { lowClip = r.GetBits(16); } if (!isEndRecord) { ClipEvents = (ClipEvents)(lowClip | highClip); ActionRecordSize = r.GetUI32(); if ((ClipEvents & ClipEvents.KeyPress) > 0) { KeyCode = r.GetByte(); } ActionRecords = new ActionRecords(r, ActionRecordSize); // always is init tag? } }