Daniel,
I was curious why in the new dev build you call the initializeRoot() after you call dispatchEvent(new starling.events.Event(starling.events.Event.CONTEXT3D_CREATE));?
We are using Starling for a multiplayer game inside of another framework and created a StarlingCoupler.as class to communicate between Starling objects and Flash objects in order to dispatch events and add event listeners and communicate with the server - to accomplish this we register objects with a 'key'. The first key is registered in the constructor of the root class:
StarlingCoupler.register(Constants.GAME_KEY, this);
Then in our base application class we listen for the CONTEXT3D_CREATE event to be dispatched:
_starling.addEventListener(StarlingEvent.CONTEXT3D_CREATE, starlingReadyHandler); private function starlingReadyHandler(e:*):void { StarlingCoupler.addEventListener(Constants.GAME_KEY, GameEvent.GAME_COMPLETE, winHandler); ...
In short - since these are now switched, the event dispatches prior to the root class is initialized and our key fails to register prior to our StarlingReady handler is called and we attempt to add an event listener. - Is there any other way for us to know when the root class has been initialized?