Search code examples
actionscript-3flashfullscreenstage

Changes to stage.displayState: Where's the event? (Flash, AS3)


What event should I be looking for (on the stage:Stage, I suppose) to get changes to the stage.displayState?


Solution

  • this works

    stage.addEventListener(Event.FULLSCREEN, doThisOnChange);
    

    for both full screen and normal changes. In your doThisOnChange method, you can figure out which you're in by looking at if (stage.displayState == StageDisplayState.NORMAL) { etc....