aduros/flambe — pull request #266 by purplepwny (2014-06-24 19:31:40+00:00)
Title: Change System.init to return a promise to cope with asynchronous platform initialization

FlashPlatform's initialization is actually asynchronous, in that we must wait for Stage3DRenderer to acquire a Context3D before we're ready to roll. Since the Flash platform requires a Context3D before textures can be loaded, quickly loading textures after calling System.init was causing undesirable behavior (null textures), due a Context3D not yet being available. With this change, we can wait for a platform to become ready before continuing with other work.