internal void BroadcastRemovedFromStageEvent(DisplayObjectContainer currentTarget) { RemovedFromStage?.Invoke(this, currentTarget); var displayObjectContainer = this as DisplayObjectContainer; if (displayObjectContainer != null) { // We need to make a copy here because the Children list might be modified in an RemovedFromStage event handler List <DisplayObject> copy = new List <DisplayObject>(displayObjectContainer.Children); foreach (var child in copy) { child.BroadcastRemovedFromStageEvent(currentTarget); } } }
internal virtual void InternalRemovedFromStage(FlashStage stage) { CheckUpdateSubscribtion(stage); RemovedFromStage.Dispatch(this); stage.events.DispatchObjectRemoved(this); }