public ClipActionRecord(SwfStream stream) { EventFlags = stream.ReadClipEventFlags(); if (EventFlags == ClipEventFlags.None) return; uint size = stream.ReadUInt(); if ((EventFlags & ClipEventFlags.KeyPress) != 0) KeyCode = new KeyCode(stream.ReadByte()); Actions = ActionRecord.ReadActions(stream, size); }
protected void Load(SwfStream stream, uint length, bool hasDeblock) { CharacterID = stream.ReadUShort(); uint alpha = stream.ReadUInt(); Deblock = hasDeblock ? (ushort?)stream.ReadUShort() : null; byte[] data = stream.ReadByteArray(length - 6); ImageData = new byte[alpha]; Array.Copy(data, 0, ImageData, 0, (int)alpha); Format = BitmapUtils.DetectFormat(ImageData); if (Format == BitmapFormat.Jpeg) ImageData = BitmapUtils.RepairJpegMarkers(ImageData); CompressedAlpha = new byte[data.Length - alpha]; if (CompressedAlpha.Length > 0) Array.Copy(data, (int)alpha, CompressedAlpha, 0, CompressedAlpha.Length); }
public void Load(SwfStream stream, uint length, byte version) { CharacterID = stream.ReadUShort(); stream.ReadUInt(); Data = stream.ReadByteArray(length - 6); }