internal void ToSwf(SwfWriter w, bool isSwf6Plus) { if ((uint)ClipEvents == 0) { if (isSwf6Plus) { w.AppendUI32(0); } else { w.AppendUI16(0); } } else { w.AppendBits((uint)ClipEvents, 32); uint start = (uint)w.Position; w.AppendUI32(0); // write len after tag written if ((ClipEvents & ClipEvents.KeyPress) > 0) { w.AppendByte(KeyCode); } ActionRecords.ToSwf(w); uint end = (uint)w.Position; w.Position = start; w.AppendUI32(end - start - 4); w.Position = end; } }
internal override void ToSwf(SwfWriter w) { if (!isInitTag) { w.AppendTagIDAndLength(this.TagType, ActionRecords.CodeSize, true); } else { w.AppendTagIDAndLength(TagType.DoInitAction, ActionRecords.CodeSize, true); } ActionRecords.ToSwf(w); }
internal override void ToSwf(SwfWriter w) { uint start = (uint)w.Position; w.AppendTagIDAndLength(this.TagType, 0, true); w.AppendByte((byte)ButtonId); for (int i = 0; i < Characters.Count; i++) { Characters[i].ToSwf(w); } ActionRecords.ToSwf(w); w.ResetLongTagLength(this.TagType, start, true); }
internal void ToSwf(SwfWriter w) { w.AppendUI16(CondActionSize); w.AppendBit(CondIdleToOverDown); w.AppendBit(CondOutDownToIdle); w.AppendBit(CondOutDownToOverDown); w.AppendBit(CondOverDownToOutDown); w.AppendBit(CondOverDownToOverUp); w.AppendBit(CondOverUpToOverDown); w.AppendBit(CondOverUpToIdle); w.AppendBit(CondIdleToOverUp); w.AppendBits(CondKeyPress, 7); w.AppendBit(CondOverDownToIdle); ActionRecords.ToSwf(w); }