0 Replies Latest reply on Sep 27, 2010 6:47 AM by smon_ed

    Flex AIR 2.0 centred application has an uncentred Alert control

      <?xml version="1.0" encoding="utf-8"?>
      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
              width="1024" height="768"
         import mx.controls.Alert;
         public function appStartup():void
          stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
          stage.scaleMode = StageScaleMode.NO_SCALE;
          stage.align = "";
          var myAlert:Alert;
          myAlert = Alert.show("This is my Alert control.", "ALERT!", Alert.OK);
          myAlert.width = 300;
          myAlert.height = 150;
        <!-- Place non-visual elements (e.g., services, value objects) here -->
       <s:Rect width="1024" height="768">                              
         <s:SolidColor color="#0000FF"/>


      I am setting my application to full screen, with no scaling.


      My application is 1024x768 and on a screen that is, for example, 1280x1024, I need to centre the application to the user's screen.


      I do this by using align="" which is the only way I found to achieve this.


      But when I show an Alert box, the Alert is aligned to the top-left of the application and not the top-left of the screen.


      I'll post an image if that's not so clear.


      Any tips on how to get the Alert centred to the screen?