I created an Array with captions and now I want to make it so when I press one of the buttons it will make the caption appear. For this I have used a For loop.
thumbNailCaption* does trace the variables I’ve assigned, but I can’t get thumbNailCaption.textDisp* to trace anything like it. No matter how many variations I’ve made, it always comes out undefined! Does anyone know what I’m doing wrong?
stop();
// CREATES AN ARRAY TO HOLD THUMBNAIL COMMENTS
var thumbNailCaption = new Array();
thumbNailCaption[0] = “abc”;
thumbNailCaption[1] = “def”;
thumbNailCaption[2] = “ghi”;
// BUTTON PROPERTIES
for (i = 0; i < 12; i++) {
** this[“thumbNailCaption”+i].textDisp = thumbNailCaption*;**
mcBody.mainBody[“thumbNail”+ i].onRelease = function() { _root.mcBody.mainBody.textCaption.textDisp = this.textDisp;}
}