Make sure you have a reference to your Alert control in your component code:
import mx.controls.Alert;
 
Then to use it, you use:
Alert.show("Hello World");
 
Thank you,
Greg Andora
IT - Web Development Group
Database Analyst/Programmer
(702) 862-7725
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Greg Johnson
Sent: Thursday, October 06, 2005 9:07 AM
To: [email protected]
Subject: [flexcoders] How do I get alert to work in a flex component

I have the main application, then I have a Flex component.  But if I
try to add a alert("") it says it doesn't know what im talking about. 
If I add _root.alert("") it will not give an error, but it won't show
the alert window either. :/

Here is the app line from the main flex app
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
xmlns="*" initialize="initFunction()">

and here is the call to the component
<otdTab label="OTD" />




--
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 ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this document (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com

Reply via email to