2 Replies Latest reply on Jun 3, 2009 6:31 PM by Flex harUI

    Can't add children to the stage via a class


      Hi there,


      I am trying to addChild(displayObject) via a class, and nothing appears when I add it to the stage. Help please!



      package com.ryancanulla.utils
           import flash.display.Sprite;
           import mx.controls.TextArea;
           public class ArchiveData extends Sprite {
                private var test:TextArea = new TextArea;
                public function ArchiveData():void {
                     //var testText.text = "this is a test";
                     test.text = "this is a test";

      calling the class

               private var archiveData:ArchiveData;
               archiveData = new ArchiveData();