0 Replies Latest reply on Oct 18, 2009 4:10 AM by IptamenosOllandos

    how to call an alert box within an actionscript project??

    IptamenosOllandos

      Hi,

       

      i know that in an mxml project, i can trigger an alert box like this:

       import mx.controls.Alert;
      
                 [Embed(source="assets/bulletCritical.png")]
                  private var BulletCritical:Class;
      
                  [Embed(source="assets/iconCritical.png")]
                  private var IconCritical:Class;
      
                  private var alert:Alert;
      
                      var alertText:String = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse rutrum metus nonummy augue. In hac habitasse platea dictumst. Nulla arcu libero, nonummy non, suscipit a, mollis non, augue. Maecenas porttitor urna vel enim. Nam eget tortor. Mauris facilisis suscipit felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin nunc turpis, venenatis non, laoreet at, fringilla nec, purus. Sed sodales. Sed turpis. Vestibulum sagittis justo id metus. Sed placerat, nibh lobortis mattis adipiscing, sapien wisi interdum arcu, nec vehicula sem tortor id nibh.";
                      var alertTitle:String = "The quick brown fox jumped over the lazy dog.";
                      alert = Alert.show(alertText, alertTitle, 4, null, null, IconCritical);
                      alert.titleIcon = BulletCritical;
      
      
      

      but i can't find how i can do that in an actionscript project.

      Which class do i have to import and which command do i have to use??