# Text (all types of textfields)

**URL:** <https://forum.kirupa.com/t/text-all-types-of-textfields/56297>\
**Category:** flash\
**Created:** [July 2, 2004, 12:15pm UTC](https://forum.kirupa.com/t/text-all-types-of-textfields/56297 "2004-07-02T12:15:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luster](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@luster](https://forum.kirupa.com/u/luster)\
**Post date:** [July 2, 2004, 12:15pm UTC](https://forum.kirupa.com/t/text-all-types-of-textfields/56297/1 "2004-07-02T12:15:48Z")

</div>

Hi,  
I’m trying to make a Flash movie that could be used to question you.  
It works very simple: one textbox gives a word, in another you have to give the translation.  
It would be something like this: -Dynamic textbox for the words  
-Input text for the answers  
That would be done with an if ( if dynamic is the word and the input the correct matching word), so it says “correct” or shows a green thing or something like that.  
Now, the hard thing (for me) is: if you have a lot of words ( 500 for example)  
isn’t there a way to do that without making 500 different if-statements?  
Any help would be greatly appreciated.

Luster

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2004, 11:54pm UTC](https://forum.kirupa.com/t/text-all-types-of-textfields/56297/2 "2004-07-04T23:54:54Z")

</div>

Make use of an array, first make a input text field called “myInputText” and a dynamic text field called “myDynamicText”, and one simple button.

//--------------------------------------------------------\>  
// create a array on your timeline:  
myArray=[“kirupa”,“really”,“rules”];

//on your button:  
on(release){  
for(var c=0;c\<\_root.myArray.length;c++){  
if(\_root.myInputText == \_root.myArray[c]){  
\_root.myDynamicText=“Allright, the word “+\_root.myArray[c]+” is in myArray”;  
}  
}  
//--------------------------------------------------------\>  
Now export your movie by pressing ctrl+enter.  
Type for example “kirupa” into the input text field… and press the button.  
Now if i am right the dynamic text field will show you this message:  
“Allright, the word kirupa is in myArray”.

Good luck,  
Martijn Himpers
