# Movieclip.addChild(textfield), textfield not visible?

**URL:** <https://forum.kirupa.com/t/movieclip-addchild-textfield-textfield-not-visible/287958>\
**Category:** Uncategorized\
**Created:** [May 8, 2009, 2:34pm UTC](https://forum.kirupa.com/t/movieclip-addchild-textfield-textfield-not-visible/287958 "2009-05-08T14:34:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozkanb](https://avatars.discourse-cdn.com/v4/letter/o/b4bc9f/32.png) [@ozkanb](https://forum.kirupa.com/u/ozkanb)\
**Post date:** [May 8, 2009, 2:34pm UTC](https://forum.kirupa.com/t/movieclip-addchild-textfield-textfield-not-visible/287958/1 "2009-05-08T14:34:15Z")

</div>

hi everyone,  
i’m working on a project for school, but i can’t continue because my code doesn’t work correct.

my problem:  
i have a movieclip, an image at the same size as the movieclip (it’s like the backgroundImage of the mc) and a textfield.

i have first created a movieclip object ‘my\_mc’  
then i loaded an external image ‘ld\_image’  
i created also a TextField object ‘txtField’ with backgroundColor red  
then i did:

```auto
my_mc.addChild(ld_image);

//my_mc size = ld_image size

```

after that i did:

```auto
my_mc.addChild(txtField);

addChild(my_mc);

```

but now the txtField isn’t visible but my cursor changes if i go over it with my mouse.

here is my code

```auto

            var test:inDeKijker = new inDeKijker();
            test.x=359;
            test.y=70;

            var loader:URLLoader = new URLLoader();
            loader.load(new URLRequest("http://www.stubru.be/indekijker/home/"));
            loader.addEventListener(Event.COMPLETE, geladen);

            var xml:XML;
            function geladen(evt:Event):void {
                xml = new XML(evt.target.data);
                var tekst:XMLList = xml.channel.item;
                var fotos:XMLList = xml.channel.item.enclosure;
                trace(fotos.attribute("url")[0]);
                
                
                var loadImage:Loader = new Loader();
                loadImage.load(new URLRequest(fotos.attribute("url")[0]));
                loadImage.contentLoaderInfo.addEventListener(Event.INIT, fotoLoaded);
                
                function fotoLoaded(evt:Event):void {
                    var ld:Loader = Loader(evt.target.loader);
                    ld.width = 330;
                     ld.height = 165;
                    
                    test.addChild(ld);
                    
                    var tekstveld:TextField = new TextField();
                    tekstveld.text = "TEEEESSSST";
                    tekstveld.backgroundColor = 0xFF0000;
                    tekstveld.background = true;
                    test.addChild(tekstveld);
                                    
                    addChild(test);
                }
            }

```

what can i do for it?  
thx!
