modifying to create a dynamically loaded row/column grid of thumbs from which to load movies into a main clip
A clip is duplicated and then rollover function is added. This works to load the most current value of “i”. Since the buttons were dynamically created and named according to “i” while loading. I want to use the now static values of the buttons to make the rollovers load the correct image. Any help is appreciated. Thanks. “p” currently will only refer to the first image already loaded.
SOLVED! Thanks to http://www.actionscript.org/forums/showthread.php3?t=145764&highlight=dynamic+onrelease
NEW CODE:
//Side Index
//Make Only Enough Buttons
duplicateMovieClip(myButton, "button_"+i, i+1);
var mc = eval("button_" + i);
//Add Unique Identifier
mc.i = i;
var cellX = i % nbrColumns;
var cellY = Math.floor(i / nbrColumns);
mc._x = leftMargin + cellX * cellWidth;
mc._y = topMargin + cellY * cellHeight;
mc.gotoAndStop(i+1);
//OnRelease Handler
mc.onRelease = function(){
mcProjectViewer.loadMovie(image[this.i], 1);
textHolder.textCompany.text = company[this.i];
textHolder.textInfo.text = description[this.i];
}
}