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