2 Replies Latest reply on Jun 15, 2009 10:23 AM by rvollmar

    Alert popup window isn't always centered


      OK, this is really specific:


      In the application below, I'm calling Alert.show() from an itemClick event handler that's triggered from a PopUpMenuButton control. When the user clicks the button, the Alert popup is centered on the screen as expected. When the user selects an item from the control's popup button, the Alert popup is displayed in the top left corner of the application instead of the application's center.


      Here it is....


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
          import mx.controls.Alert;
          import mx.events.MenuEvent;
          private function itemClickHandler(event:MenuEvent):void
            Alert.show("Menu label: " + event.item.@label,
              "Menu value: " + event.item.@value);
          <fx:XMLList id="xSizes">
            <node label="Small" value="S"/>
            <node label="Medium" value="M"/>
            <node label="Large" value="L"/>
        <s:Panel title="PopUpMenuButton Demo"
          horizontalCenter="0" top="20">
              paddingTop="10" paddingLeft="10"
              paddingRight="10" paddingBottom="10"/>
          <s:SimpleText text="Select a size:"/>
          <mx:PopUpMenuButton id="p2"