var cityArray:Array = new Array();
cityArray[0] = "southland";
cityArray[1] = "otago";
cityArray[2] = "westland";
cityArray[3] = "sthCanterbury";
cityArray[4] = "nthCanterbury";
cityArray[5] = "buller";
cityArray[6] = "marlborough";
cityArray[7] = "nelson";
cityArray[8] = "wellington";
cityArray[9] = "manawatu";
cityArray[10] = "hawkesbay";
cityArray[11] = "taranaki";
cityArray[12] = "eastCoast";
cityArray[13] = "centralNorth";
cityArray[14] = "bop";
cityArray[15] = "waikato";
cityArray[16] = "auckland";
cityArray[17] = "northland";
var startNumber:Number = 0;
for (var createLinks:Number = 0; createLinks<cityArray.length; createLinks++) {
_root.nzmap_mc[cityArray[createLinks]+"_mc"].onRelease = function() {
var thisNumber:Number = _root.startNumber;
trace(thisNumber);
//Play Animation
//_root.nthCanterbury.play();
//Disable Map
//mapEnable(false);
//Fade Map
//fadeOut(nzmap_mc);
};
_root.startNumber++;
}
What have I done wrong? I’m trying to give each mc it’s own number based on the name position in the array etc etc - It returns 18 for all of them when I click them one at a time.
Please Help