2 Replies Latest reply on Jun 16, 2009 11:54 PM by Sreelash

    Dynamically displaying text in a textfield

    Sreelash

      Hi,

                I want to display text in a textfield which dynamically creating. Also this textField is creating inside a movicelip which is created dynamically. I used the following code. Its not working.

       

           var mainMc:MovieClip = _root.createEmptyMovieClip("mainMc",1000);

           mainMc.createTextField("my_txt",1,100,100,300,100);
           my_txt.text = "This is my first test field object text.";

       

      But when I used the following code, the text was displayed.

       

           _root.createTextField("my_txt",1,100,100,300,100);
           my_txt.text = "This is my first test field object text.";

       

      Actually I would like to know whether it's possible to implement with the code that I explained first.