Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Match a value in an array

Status
Not open for further replies.

tomhughes

Vendor
Aug 8, 2001
233
US
I am trying to match the count value in an array with the value of a variable in a text box.When a match is found I would like to save the value of the counter, or the value of the Array.

----------------------


var m;
for (i=0;i<23;i++){
if ((KeyArray) == (varSecond1)){
varSecond2 = varSecond1;
}
}


-------------------------


1) I type a value in the text box of variable named
varSecond1
2) The script then scrolls through the values of the array
until it matches the value of the text box variable
varSecond1.
3) After a match is found either the value of the counter
is displayed, or the value of the array is displayed in
varSecond2.

I am using Flash MX
 
The value of KeyArray) is also a text string. "i" is an integer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top