Can't seem to listen for FullScreenEvents

kamcknig's Avatar

kamcknig

02 Dec, 2011 12:59 AM

Hi everyone,

I'm creating an AIR application.

I've created an AppMediator to mediate the main application with mediatorMap.mapView(Main, AppMediator) where Main is the compiled class.

In the AppMediator's onRegister method I tested if I could get events by just listening for MouseEvents and those work correctly. But if I try to use the eventMap to map a listener to view.stage and listen for FullScreenEvent.FULL_SCREEN, then I never get those it seems.

Has anyone else tried this and if so were you successfull and if so... how??

Kyle

  1. 1 Posted by kamcknig on 02 Dec, 2011 01:06 AM

    kamcknig's Avatar

    here is the code in my app mediator

    `override public function onRegister():void

        {
            super.onRegister();
    
            trace("[AppMediator] - [onRegister] :: ");
            eventMap.mapListener(view.stage, FullScreenEvent.FULL_SCREEN, onFullScreen);
            eventMap.mapListener(view, MouseEvent.CLICK, onClick);
        }
    
        private function onClick(e:MouseEvent):void 
        {
            trace("[AppMediator] - [onClick] :: ");
            trace(view);
        }
    
        private function onFullScreen(e:FullScreenEvent):void 
        {
            trace("[AppMediator] - [onFullScreen] :: ");
            trace(e.fullScreen);
        }
    

    `

  2. 2 Posted by kamcknig on 02 Dec, 2011 01:40 AM

    kamcknig's Avatar

    I've figured it out. It's because the stage during the onRegister method is not the same stage property as when I'm actually going into/leaving fullscreen since I'm moving the view around to different windows in the AIR app

  3. kamcknig closed this discussion on 02 Dec, 2011 01:41 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac