Try this:

import mx.controls.Alert;

private function show():Void
{
  var a:Alert = Alert.show("message", "title", Alert.OK | Alert.CANCEL);

  a.addEventListener("click", this);
}

private function click(event:Object):Void
{
  if (event.detail == Alert.OK) 
  {
    // do stuff for OK...
  } 
  else if (event.detail == Alert.CANCEL)
  {
    // do stuff for CANCEL...
  }
}


Dirk.

> -----Original Message-----
> From: [email protected] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Nono 
> Carballo Escalona
> Sent: Monday, December 05, 2005 5:06 PM
> To: [email protected]
> Subject: [flexcoders] Need to know the button pressed in an Alert box
> 
> Hi!
> 
> Does anyone know how do I get in a handler passed as argument 
> to an Alert.show method the button pressed?
> 
> Thanks in advance.
> 
> Nono Carballo Escalona
> 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to