Home
> Adobe Flex/Air > Flex custom Alert message
Flex custom Alert message
How do you feel about the default Flex Alert box? i think it’s kind of simple, don’t you?
Udayms give us an amazing customize of it from here. His example works fine except with Confirm message. Even if yes or no is selected, nothing seem to happen. I don’t know if i missed something but after trying to look around finally i figured it out.
public static function confirm(message:String, parent:Sprite=null, closehandler:Function=null):void{ //show(message, "Confirmation", Alert.YES | Alert.NO, null, closehandler, iconConfirm); show(message, 'Confirmation', Alert.OK| Alert.CANCEL, null, closehandler, iconConfirm, Alert.OK); }
By replacing Alert.YES/Alert.No by Alert.OK/Alert.CANCEL it seems work in my case.
Click here to download source code.
Categories: Adobe Flex/Air
Flex/Air
I have implemented your changes for the confirm alert…however i get the same behavior no matter which button I hit… could please give me an example of the confirm alert that has a closehandler with a param being passed to the closehandler function i.e alert.confirm(‘message’, doFunction(param)) this does not work for me!!
Hi Lugene,
I don’t know the reason why you have to pass parameters through CloseHandler? can you give me more information on your scenario so we can discuss and maybe have a better solution for it.
There was my mistake on the Alert confirm code, please confirm again. Below is my source code show you how to use the confirm message box
Script:
MXML
Hi,
Can anyone help me to make my MS-Outlook type mail popup?
concept is it will appear when button is clicked, after sometime it will disappear, same like MS-Outlook