public void Load(SwfStream stream, uint length, byte version) { mFlags = stream.ReadByte(); Depth = stream.ReadUShort(); if (HasCharacter) CharacterID = stream.ReadUShort(); if (HasMatrix) Matrix = stream.ReadMatrix(); if (HasCxForm) CxForm = stream.ReadCxForm(true); if (HasRatio) Ratio = stream.ReadUShort(); if (HasName) Name = stream.ReadString(); if (HasClipDepth) ClipDepth = stream.ReadUShort(); if (HasActions) Actions = new ClipActions(stream); }
public void SetClipActions(ClipActions actions) { foreach (var action in actions.Records) { foreach (var e in action.Events) _eventActions[(int)e] = action.Actions; if ((action.EventFlags & ClipEventFlags.KeyPress) != 0) { _keyPressKeyCode = action.KeyCode; _keyPress = action.Actions; } } }
public void Load(SwfStream stream, uint length, byte version) { mFlags = stream.ReadUShort(); Depth = stream.ReadUShort(); if (HasClassName || (HasImage && HasCharacter)) ClassName = stream.ReadString(); if (HasCharacter) CharacterID = stream.ReadUShort(); if (HasMatrix) Matrix = stream.ReadMatrix(); if (HasCxForm) CxForm = stream.ReadCxForm(true); if (HasRatio) Ratio = stream.ReadUShort(); if (HasName) Name = stream.ReadString(); if (HasClipDepth) ClipDepth = stream.ReadUShort(); Filters = HasFilterList ? Filter.ReadFilterList(stream) : new Filter[0]; if (HasBlendMode) BlendMode = (BlendMode)stream.ReadByte(); if (HasCacheAsBitmap) BitmapCache = stream.ReadByte(); if (HasActions) Actions = new ClipActions(stream); }