I tried to create a class extends from 
MovieClip and can added mx.controls.Text

I tried MovieClip/UIMovieClip...doesn't work !
I don't use Sprite as all other controls 
that I will aded is from UIComponent based.

package  {
   import mx.flash.UIMovieClip;
   import mx.controls.Text;
   import flash.events.Event;
   public class test extends UIMovieClip {
        public function test(){
                addEventListener(Event.ADDED_TO_STAGE,onInit);
        }
        public function onInit(evt:Event):void{
                var tf:Text = new Text;
                tf.text = 'Hi !';
                tf.width = 100;
                tf.height = 100;
                addChild(tf);
        }       
}

Reply via email to