06 March 2011

BUG : changing stage.displayState break key listener

If you ever call
stage.displayState = StageDisplayState.FULL_SCREEN
on your game, this will break any listener you added throught

NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN,
onKeyPress);

I tried to re-add it listening to FullScreen event, without success...

It's not needed on AIR app, but I share the same code for Web and AIR version.
It's handy when you're online and the player get back to game.

So... only call it if (Capabilities.playerType=="PlugIn") !!

No comments: