# \[F8\] array and variables help please \>\<

**URL:** <https://forum.kirupa.com/t/f8-array-and-variables-help-please/216053>\
**Category:** flash\
**Created:** [February 13, 2007, 10:38am UTC](https://forum.kirupa.com/t/f8-array-and-variables-help-please/216053 "2007-02-13T10:38:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dom\_1](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@Dom\_1](https://forum.kirupa.com/u/Dom_1)\
**Post date:** [February 13, 2007, 10:38am UTC](https://forum.kirupa.com/t/f8-array-and-variables-help-please/216053/1 "2007-02-13T10:38:30Z")

</div>

Hi, so I have this problem thats giving me real headache because I have the feeling the solution is pretty simple only I can’t get my finger on it! How can you check mutliple elements against multiple results at once ? example :

```auto
 var ltr:String = "mystring"; for (var i:Number = 0; i < ltr.length; i++) { this.createTextField ("ltrField" + i, i, 0, 0, 30, 30); if (_root["ltrField" + i].text == ltr.substr (i, 1)) { _root["ltrField" + i].text = ltr.substr (i, 1); } } 

```

```
I wan to be able to check if each each text field's letter is the same as my variable's substring in order to set all text fields letters back to the proper value. Its a kind of randomly cycling letter thingy. thx
```
