From the docs –

 

<?xml version="1.0"?>

<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml">

 

    <mx:Script>

        <![CDATA[

            import mx.controls.Alert;

            import mx.events.CloseEvent;

           

            [Embed(source="alertIcon.jpg")]

            [Bindable]

            public var iconSymbol:Class;

 

            private function alertListener(eventObj:CloseEvent):void {

                // Check to see if the OK button was pressed.

                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("Copy Text?", "Alert",

                    Alert.OK     | Alert.CANCEL, this,

                    alertListener, iconSymbol,     Alert.OK );'/>

        <mx:TextInput id="myText"/>

</mx:Application>

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of huhgawz
Sent: Friday, February 03, 2006 2:36 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to set the icon of an Alert via ActionScript? (Flex 2 beta 1)

 

Hi flexcoders

Does anyone knows how to set the icon of an Alert via ActionScript?






--
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




Reply via email to