Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
...case ApplicationFacade.STAGE_ADD_SPRITE: var params:Array = note.getBody() as Array; var helloSprite:HelloSprite = new HelloSprite( spriteDataProxy.nextSpriteID, params ); facade.registerMediator(new HelloSpriteMediator( helloSprite )); stage.addChild( helloSprite ); facade.removeMediator("sprite1"); // <---------- Remove the Mediator with the Name "sprite1" ----------------------- break;...
...private function onSpriteDivide(event:Event) { helloSprite.color=spriteDataProxy.nextSpriteColor(helloSprite.color); var params:Array = [ helloSprite.xLoc, helloSprite.yLoc, -(helloSprite.xVec), -(helloSprite.yVec), helloSprite.size, helloSprite.color ]; sendNotification( ApplicationFacade.STAGE_ADD_SPRITE, params ); trace(getMediatorName()); <--------------- Trace his own MediatorName ------------------------------ }...