public void Set(PlaceObject2Tag tag, MovieClip clip) { DisplayObject obj; var n = _displayList.Last; for (; n != null && n.Value.Depth > tag.Depth; n = n.Previous) ; if (n == null) { obj = DisplayObject.CreateAndPlace(tag, clip); if (obj != null) _displayList.AddFirst(obj); return; } if (n.Value.Depth == tag.Depth) { if (!n.Value.SetPlacement(tag, clip)) _displayList.Remove(n); return; } obj = DisplayObject.CreateAndPlace(tag, clip); if (obj != null) _displayList.AddAfter(n, obj); }
public void StartDrag(MovieClip clip, bool lockCenter, Rectangle? constraint) { }
public void ProcessSpriteFrame(SpriteFrame frame, MovieClip clip) { DisplayObject obj; var n = _displayList.First; foreach (var r in frame.RemovedObjects) { for (; n != null && n.Value.Depth < r; n = n.Next) ; if (n == null) break; if (n.Value.Depth == r) { if (n.Next == null) { n.Value.Removed(); _displayList.RemoveLast(); n = null; } else { n = n.Next; n.Previous.Value.Removed(); _displayList.Remove(n.Previous); } continue; } } n = _displayList.First; foreach (var m in frame.ModifiedObjects) { for (; n != null && n.Value.Depth < m.Depth; n = n.Next) ; if (n == null) { obj = DisplayObject.CreateAndPlace(m, clip); if (obj != null) _displayList.AddLast(obj); } else if (n.Value.Depth == m.Depth) { if (!n.Value.SetPlacement(m, clip)) { n = n.Next; _displayList.Remove(n); } } else { obj = DisplayObject.CreateAndPlace(m, clip); if (obj != null) _displayList.AddBefore(n, obj); } } }
public ActionVar(MovieClip mc) { MovieClip = mc; }