Esempio n. 1
0
        public static void WriteClipActionRecord(this ISwfStreamWriter writer, byte swfVersion, ClipActionRecord record)
        {
            writer.WriteClipEventFlags(swfVersion, record.Flags);
            if (record.Flags.IsEmpty)
            {
                return;
            }

            var awmem = new MemoryStream();
            var aw    = new ActionWriter(new SwfStreamWriter(awmem));

            foreach (var action in record.Actions)
            {
                aw.WriteAction(action);
            }

            var size = awmem.Length + (record.Flags.ClipEventKeyPress ? 1 : 0);

            writer.WriteUInt32((uint)size);

            if (record.Flags.ClipEventKeyPress)
            {
                writer.WriteByte(record.KeyCode);
            }

            writer.WriteBytes(awmem.ToArray());
        }
Esempio n. 2
0
 public static void WriteClipActions(this ISwfStreamWriter writer, byte swfVersion, ClipActionsList clipActions)
 {
     writer.WriteUInt16(clipActions.Reserved);
     writer.WriteClipEventFlags(swfVersion, clipActions.Flags);
     writer.WriteClipActionRecords(swfVersion, clipActions.Records);
 }