# Trouble positioning MCs and Textfields

**URL:** <https://forum.kirupa.com/t/trouble-positioning-mcs-and-textfields/224395>\
**Category:** flash\
**Created:** [May 2, 2007, 1:54am UTC](https://forum.kirupa.com/t/trouble-positioning-mcs-and-textfields/224395 "2007-05-02T01:54:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tazboy](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tazboy](https://forum.kirupa.com/u/tazboy)\
**Post date:** [May 2, 2007, 1:54am UTC](https://forum.kirupa.com/t/trouble-positioning-mcs-and-textfields/224395/1 "2007-05-02T01:54:17Z")

</div>

The picture shows what I’m trying to do.

Here’s my code:

```auto
for (var i = 0; i<nTotalPics; i++) {
    
    main.createEmptyMovieClip( "container"+i, i );
    var container:MovieClip = main["container"+i];
    container.createEmptyMovieClip( "pic"+i, i );
    var pic:MovieClip = container["pic"+i];
    
    // load images
    mcl.loadClip( astrImages*, pic );
}

// when the image finishes loading
mclListener.onLoadInit = function(pic:MovieClip){
    _level0.main.container2.createTextField("txtQuan", i+1, 0, 100, 80, 20);
    var txtQuan:TextField = _level0.main.container2.txtQuan;
    txtQuan.text = "How many : ";
}

// add the listener to the MovieClipLoader Object
mcl.addListener(mclListener);

```

I’ve got two questions:

First, if I add “trace (pic.\_name);” inside the onLoadInit function it outputs “pic3,pic2,pic1,pic0”. Why does it show up in reverse order of the for-loop?

Second, is the “pic:MovieClip” in “mclListener.onLoadInit = function(pic:MovieClip)” pointing to the “pic” in “mcl.loadClip( astrImages\*, pic );”? If not, what is it pointing to? If it is, can I add another variable after “pic” so that I can pass it inside the onLoadInit function?

Ultimately what I would like to do is create a textfield under each pic.

I know this is a lot. It’s just too much for me to troubleshoot because I’m overwhelmed with all of these at once. If you can answer just one question I would greatly appreciate it. Thanks all.
