I posted this auciton earlier but I got two incorrect responses and from there no one else helps. So here we go again.
I have a for loop that runs 1 - 8. I need to call 8 items from an array. I have the for loop set up and the Array as well but they don’t work together. To be clear, I know this can be done. Please do not reply to the post if your answer is that it can not. Now that I got that out of the way, thanks for your time.
//Creates array to hold Body content
var bodies = new Array();
bodies[0] = “”;
bodies[1] = “Glit body”;
bodies[2] = “Scar body”;
bodies[3] = “Lab body”;
bodies[4] = “Box body”;
bodies[5] = “Snap body”;
bodies[6] = “DHI body”;
bodies[7] = “Max body”;
//DECLARE BUTTON PROPERTIES
for(i=0;i<8;i++) {
_root.field[“cell”+i].onPress = function () { this.gotoAndPlay(“down”);}
_root.field[“cell”+i].onRelease = function () { this.gotoAndPlay(“over”);
[COLOR=Red]** _root.field.captionBodyDisp = bodies*;}<– this does not work. it results in undefined because it looks for the last possible number in the array and stays there. **[/COLOR]
_root.field[“cell”+i].onRollOver = function () { this.gotoAndPlay(“over”);}
_root.field[“cell”+i].onRollOut = function () { this.gotoAndPlay(“up”);}
_root.field[“cell”+i].onDragOut = function () { this.gotoAndPlay(“up”);}
}