Mega Code Archive

 
Categories / Flex / Components
 

Include an icon in the Alert control

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:Script>                  import mx.controls.Alert;         import mx.events.CloseEvent;         [Embed(source="logo.jpg")]         [Bindable]         public var iconSymbol:Class;         private function alertListener(eventObj:CloseEvent):void {             if (eventObj.detail==Alert.OK) {                 myText.text = myInput.text;             }         }            </mx:Script>     <mx:TextInput id="myInput" width="150" text="" />     <mx:Button id="myButton" label="Copy Text"         click='Alert.show("this is a test", "Alert",Alert.OK | Alert.CANCEL, this,alertListener, iconSymbol, Alert.OK );' />     <mx:TextInput id="myText" /> </mx:Application>