Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
public function BasicMediator(myTarget:Sprite,myData:Object,myName:String=null) { super(myName); initContainer(myTarget); ObjectUtils.synch(myData,this); //addViewElement() trace(NAME); }
public function HelloSpriteMediator( viewComponent:Object ) { // pass the viewComponent to the superclass where // it will be stored in the inherited viewComponent property // // *** Note that the name of the mediator is the same as the // *** id of the HelloSprite it stewards. It does not use a // *** fixed 'NAME' constant as most single-use mediators do super( HelloSprite(viewComponent).id, viewComponent ); // Retrieve reference to frequently consulted Proxies spriteDataProxy = facade.retrieveProxy( SpriteDataProxy.NAME ) as SpriteDataProxy; // Listen for events from the view component helloSprite.addEventListener( HelloSprite.SPRITE_DIVIDE, onSpriteDivide ); }
public function BasicMediator(myTarget:Sprite,tViewComponent) { trace(tViewComponent.id) super(tViewComponent.id,tViewComponent); trace(NAME); }
trace( this.getMediatorName() );
mediatorName=myName != null?myName:NAME; super(mediatorName,myViewComponent);