2 Replies Latest reply on Sep 20, 2007 10:31 PM by GetCoding

    JavaScript controlled fullscreen for FLVPlayBack CS3 AS3

    GetCoding
      I am working on a flash player in AS3, and the default skin fullscreen button works. However, I want to use JavaScript to control the fullscreen behavior, and even launch the player fullscreen when playing. The problem I am encountering is a security error. I have allowFullScreen = true and Security.allowDomain('mydomain.com') set.

      SecurityError: Error #2152: Full screen mode is not allowed.
      at flash.display::Stage/set displayState()
      at buble_player_fla::MainTimeline/handle_fullscreen()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at ()
      at flash.external::ExternalInterface$/flash.external:ExternalInterface::_callIn()
      at ()

      What is odd is I can tell the player to go to normal screen from fullscreen, but not the other way around.

      I looked at the flvplayback.as file and noticed that the fullscreen control is attached to the component _vc.stage.displayState = StageDisplayState.FULL_SCREEN; to launch fullscreen when handled by the fullscreen button event.

      I've tried both stage.displayState = StageDisplayState.FULL_SCREEN;
      and FLVPlayBack.stage.displayState = StageDisplayState.FULL_SCREEN;

      Both result in the error, any ideas as to what I am missing? why is this sandboxed from outside the player?