# createTextFeild Issuess

**URL:** <https://forum.kirupa.com/t/createtextfeild-issuess/160340>\
**Category:** Uncategorized\
**Created:** [August 25, 2005, 6:44am UTC](https://forum.kirupa.com/t/createtextfeild-issuess/160340 "2005-08-25T06:44:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [August 25, 2005, 6:44am UTC](https://forum.kirupa.com/t/createtextfeild-issuess/160340/1 "2005-08-25T06:44:36Z")

</div>

hey guys.  
what i have is a MC WHICH SCROLLS and makes random blocks it is all coded and i want it so every 50 it makes a text feild with the number it is.  
i have two main vars.  
**i** : the var which i use to give each block a number.  
for eg i do the code createNewMovie…“block”+i…etc.  
and the var;  
**ypos** : tells where to place the next block.

so as i said i want a text box with the number in it.  
i have this code atm(NOT working);

```auto

if (i == 50) {
    _root.map.createTextField("my_txt50", _root.getNextHighestDepth(), 0, ypos-30, 20, 100);
    my_txt50.multiline = true;
    my_txt50.wordWrap = true;
    my_txt50.text = i;
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.color = 0x000000;
    my_fmt.bold = true;
    my_txt50.setTextFormat(my_fmt);
   }
   if (i == 100) {
    _root.map.createTextField("my_txt100", _root.getNextHighestDepth(), 0, ypos-30, 20, 100);
    my_txt100.multiline = true;
    my_txt100.wordWrap = true;
    my_txt100.text = i;
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.color = 0x000000;
    my_fmt.bold = true;
    my_txt100.setTextFormat(my_fmt);
   }
   if (i == 200) {
    _root.map.createTextField("my_txt200", _root.getNextHighestDepth(), 0, ypos-30, 20, 100);
    my_txt200.multiline = true;
    my_txt200.wordWrap = true;
    my_txt200.text = i;
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.color = 0x000000;
    my_fmt.bold = true;
    my_txt200.setTextFormat(my_fmt);
   }
   if (i == 150) {
    _root.map.createTextField("my_txt150", _root.getNextHighestDepth(), 0, ypos-30, 20, 100);
    my_txt150.multiline = true;
    my_txt150.wordWrap = true;
    my_txt150.text = i;
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.color = 0x000000;
    my_fmt.bold = true;
    my_txt150.setTextFormat(my_fmt);
   }

```

although i would prefer something like this;

```auto

    _root.map.createTextField("my_txt"+i, _root.getNextHighestDepth(), 0, ypos-30, 20, 100);
    "my_txt"+i.multiline = true;
     "my_txt"+i.wordWrap = true;
     "my_txt"+i.text = i;
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.color = 0x000000;
    my_fmt.bold = true;
     "my_txt"+i.setTextFormat(my_fmt);
   }

```

or something similar to that, because we all know that won’t work

What does happen atm?  
it creates ALL the text boxes at block 200 (the last one).

any ideas?
