Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
public class MyMediator extends Mediator{ public static const NAME : String = "MyMediator"; public function MyMediator() { super(NAME); } override public function onRegister() : void { var vc : ViewComponent = new ViewComponent(); DisplayObject(vc).addEventListener(FlexEvent.CREATION_COMPLETE, this.addView); this.sendNotification(AppFacade.ADD_CHILD_TO_STAGE, vc); } private function addView(e : FlexEvent) : void { this.viewComponent = e.target; }}