Show an Alert window : Alert « Components « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Components » AlertScreenshots 
Show an Alert window
Show an Alert window
        

<!--
Code from Flex Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1proper attribution to Adobe is given as the owner of the user guide; and 
  (2any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->



<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Script>
         
        import mx.controls.Alert; 
        private function myEventHandler(event:MouseEvent):void 
            Alert.show("An event of type '" + event.type + "' occurred.")
        
      
    </fx:Script>
    <s:Button id="b1" label="Click Me" click="myEventHandler(event)" />
</s:Application>

   
    
    
    
    
    
    
    
  
Related examples in the same category
1.Pass in user function to alert boxPass in user function to alert box
2.Adding icon to Alert boxAdding icon to Alert box
3.Using the Alert controlUsing the Alert control
4.Show alert with Yes no buttonShow alert with Yes no button
5.Using ActionScript and MXML together to show alert dialogUsing ActionScript and MXML together to show alert dialog
6.To use the Alert controlTo use the Alert control
7.Alert control sizes itself to fit its text, buttons, and iconAlert control sizes itself to fit its text, buttons, and icon
8.Include an icon in the Alert controlInclude an icon in the Alert control
9.If the result of the validate() method call is invalid then display an alertIf the result of the validate() method call is invalid then display an alert
10.Alert classAlert class
11.Cancel button Alert dialogCancel button Alert dialog
12.OK CANCEL button alert dialogOK CANCEL button alert dialog
13.Alert dialog button click handlerAlert dialog button click handler
14.Add icon to Alert dialogAdd icon to Alert dialog
15.show an alert window with clicking the buttonshow an alert window with clicking the button
16.Use creationComplete event to open an Alert box when the children of the HGroup container are fully processed and drawnUse creationComplete event to open an Alert box when the children of the HGroup container are fully processed and drawn
17.Open an alert when a the user clicks a data point (a column) in the chart:Open an alert when a the user clicks a data point (a column) in the chart:
18.Alert windowAlert window
19.Alert window with titleAlert window with title
20.A non-modal Alert windowA non-modal Alert window
21.Choose buttons for Alert dialog boxChoose buttons for Alert dialog box
22.An Alert dialog with custom button labelsAn Alert dialog with custom button labels
23.Alert dialog box With Default ButtonAlert dialog box With Default Button
24.An Alert dialog with close event handlerAn Alert dialog with close event handler
25.An Alert dialog with custom iconAn Alert dialog with custom icon
26.Alert With StylesAlert With Styles
27.Check Whick button clicked in Alert box close evevtCheck Whick button clicked in Alert box close evevt
28.Changing the default button labels on an Alert controlChanging the default button labels on an Alert control
29.import the Alert class into your application, then call the show() methodimport the Alert class into your application, then call the show() method
30.Alert EventAlert Event
31.using the Alert object returned from the show() methodusing the Alert object returned from the show() method
32.Copy the text when the user selects the OK button in the Alert controlCopy the text when the user selects the OK button in the Alert control
33.Alert dialog box with IconAlert dialog box with Icon
34.Using ActionScript to set the value of the Alert message, and binds the labels in the form to resources by using the ResourceManager's getString() method.
35.Check which button click in Alert close eventCheck which button click in Alert close event
36.Set label for yes button, no button and cancel buttonSet label for yes button, no button and cancel button
37.Present user with an option of navigating to the target location or cancelling the actionPresent user with an option of navigating to the target location or cancelling the action
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.