i have an array made of movieclip squares named “quiqua” that are positioned in a grid with coordinates (grouped into another array named “coo”).
Both the arrays have a numeric variable named saturaz.
when i click on the coordinates i want to highlight that coordinate and select only the elements which fit with the “saturaz” value. It works fine but I can’t figure out how to tell Flash to highlight just a coordinate (and the squares that match with that value) at a time.
This is the code. HELP ME OUT.
[SIZE=2]var quiqua:Array = [rosa, blu, viola, giallo];
var coo:Array = [sat_sessanta, sat_settanta];
var saturaz = uint;
coo[0].saturaz=60;
coo[1].saturaz=70;
quiqua[0].saturaz=60;
quiqua[1].saturaz=80;
quiqua[2].saturaz=60;
quiqua[3].saturaz=70;
for (var e:int = 0; e < coo.length; e++) {
coo[e].addEventListener(MouseEvent.CLICK, evidenzia_fisso);
coo[e].alpha = 0.4;
}
function evidenzia_fisso(event:MouseEvent):void {
for (var i:int = 0; i < quiqua.length; i++) {
if (quiqua*.saturaz != event.currentTarget.saturaz){
quiqua*.alpha = 0.2;
event.currentTarget.alpha = 1;
}
}
}[/SIZE]