9 Replies Latest reply on Feb 28, 2009 3:29 PM by marcink

    addChild() question

    marcink
      hi,

      in a flex application i have this code:

      <mx:Script>
      <![CDATA[
      private function init() : void
      {
      var p : AppPreloader = new AppPreloader();
      this.addChild(p);
      }
      ]]>
      </mx:Script>

      AppPreloader is a custom as class that extends DownloadProgressBar.

      but when i execute the code, i get an error saying the type can not be changed form AppPreloader to IUIComponent...

      anyone has a idea why i can not add AppPreloader to the displaylist?

      thanks