Searching an array for a character

[COLOR=black][FONT=Times New Roman]I made a drag and drop interaction. I have 10 drag movieclips (drag1_mc - drag10_mc) and 10 targets (target1_mc - target10_mc). [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]I have a score array (score_Array) that keeps track of the placement of the drags on the targets (“C” if correct, “W” if wrong or dropped on an area on the stage other than any of the targets (also a drop with a collision with a drag already on a target) will set a “W” in the array for that drag and the drag will move back to home). [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]The array works great. [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]I am having a problem with a string variable to tell me if there are any W’s anywhere in the score array. [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]The following code works if I place the drags in the correct targets from 1 – 10[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]1-9 (C,C,C,C,C,C,C,C,C,W) will still show the scoreStatus variable as “Wrong” [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]checkscore = function(){[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]for (i=0; i<scoreArray.length; i++) { [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] if (scoreArray* == “W”){[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] scoreStatus = “Wrong”;[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] }else { [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] scoreStatus = “Correct”; [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]}; // end of if statement[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]}; // end of for statement[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]trace("scoreStatus = " + scoreStatus);[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]}; // end of function [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]Once I hit 10 it switches to “Correct”, but if I move a drag to an incorrect place it still shows as “Correct” even though the array now shows a “W” in the elements. The array works good, just the method to determine if any elements in the array is a W is flawed.[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]If I move correctly place just drag 10 from the beginning (W,W,W,W,W,W,W,W,W,C) it will show “Correct”. [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]I need a way to search an array’s elements and determine if the string “W” equals any of the arrays elements and if so the variable scoreStatus will be “Wrong”, else “Correct” (all C’s no W’s).[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]I just could make a lengthy if statement: if((scoreArray[0] = =”C”) && ( scoreArray[1] = = “C”) &&…)) but I would like it to dynamically use the scoreArray’s length as the iteration statement (the assessment might only have 4 drag clips) [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]So that’s in a nutshell: take an Array called scoreArray with elements (C,C,C,C,C,C,C,W,C,C) and figure out that there is a W in there and make the scoreStatus:String = “Wrong” or scoreStatus:Number = 1, just something that I can check easily whether you either got all the drags right or you got the assessment wrong. [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman] [/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]Sorry this is so long…[/FONT][/COLOR]