2 Replies Latest reply on Jan 28, 2010 4:44 AM by Jim@123

    SecurityError:Error #2152

    Jim@123

      Hi,

      I was trying to display my application in full screen mode. So I used the following function

       

      private function toggleFullScreen():void {

                      try {

                          switch (Application.application.stage.displayState) {

                             case StageDisplayState.FULL_SCREEN:

                                  /* If already in full screen mode, switch to normal mode. */

                                  Application.application.stage.displayState = StageDisplayState.NORMAL;

                                  break;

                              default:

                                  /* If not in full screen mode, switch to full screen mode. */

                                  Application.application.stage.displayState = StageDisplayState.FULL_SCREEN;

                                  break;

                          }

                      } catch (err:SecurityError) {

                        Alert.show(err.toString())

                          // ignore

                      }

                  }

       

      But when I am trying to call the function, I’m getting following error message

       

      SecurityError:Error #2152

      Pls. help me to resolve this problem