Has anyone been able to get Alerts to center on anything other than the stage?
 
The docs for the show() method document the 4th param as:  parent:Sprite (default = null) — Object upon which the Alert control centers itself.
 
However, regardless what I pass on this param, the Alert window always centers itself on the stage.
 
And when I create an instance of the Alert and trace(myAlert.parent) or go into debug and check the parent of the instance the following is always displayed:  _AlertParentTest_mx_managers_SystemManager (where the application is (AlertParentTest.mxml)
 
Is this a bug?
Following is some sample test code I tried:
 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init();">
<mx:Script>
 <![CDATA[
  import mx.controls.Alert;
  private var myAlert:Alert = new Alert();  
  private function init():void {
   myAlert=Alert.show( "init() executes Alert.show()","myAlert.parent:",Alert.OK,Button1);trace("myAlert.parent: "+ myAlert.parent);
  }
 ]]>
</mx:Script>
<mx:Canvas width="100%" height="100%"> 
 <mx:Button label="Button1" id="Button1"  click='myAlert=Alert.show( "Button1 Clicked","myAlert.parent:",Alert.OK,Button1);trace("myAlert.parent: "+ myAlert.parent);' left="0" top="0"/>
 <mx:Button label="Button2" id="Button2" click='myAlert=Alert.show( "Button2 Clicked","myAlert.parent:",Alert.OK,Button1);trace("myAlert.parent: "+ myAlert.parent);' right="0" bottom="0"/>
</mx:Canvas>
 
</mx:Application>
 


All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to