views:

350

answers:

2

I have a flash site that users can view full Screen video. the trouble is, I am making only the video player full screen (hiding the rest of the site behind it).

my "toggle full screen" button works in that it reduces the video player back to normal size when the user toggles out of full screen back.

but when the user hits the escape key, my flash script doesn't know that the video player should be reduced in size.

it seems there's no way to capture the ESCAPE key as a key event. any ideas?

+1  A: 

Register for this event:

this.stage.addEventListener( flash.events.FullScreenEvent.FULL_SCREEN , this.noticeDisplayState );

Then handle it:

public function noticeDisplayState( inEvent:Event ) {
    if ( this.stage.displayState != StageDisplayState.FULL_SCREEN ) {
        // escape key pressed
    }
}
drawnonward
thank you. easy enough
P..