4 Replies Latest reply on Aug 3, 2009 10:46 AM by Gregory Lafrance

    Creating mxml component at run-time

    Zolotoj Level 3

      Why the following code fails with null object reference error:

      var ca:customAlert = new customAlert();              
      ca.title = "Warning!";
      ca.messageNumber = messageNumber;
      ca.callbackfunction = callbackFunction;
      ca.message.text = message;
      ca.b1.label = "YES";
      ca.b2.visible = true;
      ca.b2.label = "NO";
      PopUpManager.centerPopUp(ca);
      

      customAlert is extended TitleWindow.

       

      Thanks