Palidor is an extension to integrates Robotlegs and Starling, which contains:
StarlingIntegration
StarlingContextView
StarlingViewMap
StarlingMediator
StarlingViewManager
StarlingCommandMap
FlowManager
SignalCommandMap
KeyCommandMap
KeyDispatcher
const robotlegsContext:IContext = new Context();
robotlegsContext.install( PalidorBundle );
robotlegsContext.configure( YourConfig, starling, new ContextView( this ) );
public class YourConfig implements IConfig
{
[Inject]
public var eventDispatcher:EventDispatcher; //starling.events.EventDispatcher
[Inject]
public var mediatorMap:IMediatorMap;
[Inject]
public var context:IContext;
[Inject]
public var flowManager:IFlowManager;
[Inject]
public var commandMap:IStarlingCommandMap;
public function configure():void
{
context.afterInitializing( initialize );
}
private function initialize():void
{
commandMap.map( CustomEvent.COMMAND_01 ).toCommand( FirstCommand );
commandMap.map( CustomEvent.COMMAND_02 ).toCommand( SecondCommand );
mediatorMap.map( FirstView ).toMediator( FirstViewMediator );
mediatorMap.map( FirstFloatingView ).toMediator( FirstFloatingViewMediator );
flowManager.map( CustomEvent.SHOW_FIRST_VIEW ).toView( FirstView );
flowManager.map( CustomEvent.SHOW_FIRST_FLOATING_VIEW ).toFloatingView( FirstFloatingView );
eventDispatcher.dispatchEventWith( CustomEvent.SHOW_FIRST_VIEW );
}
}