# Range within an array

**URL:** <https://forum.kirupa.com/t/range-within-an-array/193046>\
**Category:** flash\
**Created:** [July 3, 2006, 10:15pm UTC](https://forum.kirupa.com/t/range-within-an-array/193046 "2006-07-03T22:15:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![540media](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/540media/32/2543_2.png) [@540media](https://forum.kirupa.com/u/540media)\
**Post date:** [July 3, 2006, 10:15pm UTC](https://forum.kirupa.com/t/range-within-an-array/193046/1 "2006-07-03T22:15:15Z")

</div>

Hi, I was wondering if someone could help me?

I’m trying to create an simple (yet I still can seem to do it) task where a user has to enter a prevously worked out number into an input box clicks a button and get a correct or incorrect message.

I need the number that they enter to be a numer within a range ie. 1.0 to 1.9

I have 2 text boxs on stage… 1 an input text box (called inputBox) and the other a dynamic text box (called answerBox) also the is a button on stage to exec the script

on the root timeline the script is:

```auto

numbers = ["1.0", "1.1", "1.2" etc etc];
function checkNumbers () {
for (i=0; i < numbers.length; i++) {
if (_root.inputBox == numbers*) {
_root.answerBox = "Correct";
} else {
_root.answerBox = "Wrong"
}
}
i} 

```

and on the button is:

```auto

on (release){
checkNumbers()
}

```

but whatever I do I cant get it to work, can someone help me out here please???
