Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
facade.removeMediator(HelloSpriteMediator.getMediatorName());
for(var i=0; i<=10; i++){ var helloSprite:HelloSprite = new HelloSprite(...); helloSprite.name = "helloSprite" + i; facade.registerMediator(new HelloSpriteMediator( helloSprite )); stage.addChild( helloSprite );}
var tmpSprite:HelloSprite = stage.getChildByName("helloSprite5");stage.removeChild(tmpSprite);
/** * Get the Mediator name * <P> * Called by the framework to get the name of this * mediator. If there is only one instance, we may * define it in a constant and return it here. If * there are multiple instances, this method must * return the unique name of this instance.</P> * * @return String the Mediator name */ override public function getMediatorName():String { return helloSprite.id; }