okay… prob take more time to explain why… .but basically i have 100 buttons being generated and assigned names ( eh_1, eh_2, eh_3, … ). On press they are controlling several functions but i would also like them to load a corresponding jpg into a blank movie clip. the jpgs are labeled… (1.jpg, 2.jpg …)
var currentButton:Number = new Number();
for (var i:Number = 1; i<101; i++) {
_root["eh_"+i].id = i;
_root["eh_"+i].onPress = function() {
currentButton = this.id;
numpressed = i;
var BGload= eval("../images/backgrounds/"+i+".jpg");
_root.BG_mc1.loadMovie(BGload);
_root.debug3.text = "pressed = "+currentButton;
currentButton %= bgColorArray.length;
transformColor(hexToARGB(bgColorArray[bgColorNum]));
_root.debughex.text = "loaded RGB:
R: "+bgct.redOffset+"
G:
"+bgct.greenOffset+"
B: "+bgct.blueOffset;
};
now… when i do this its giving me an undefined variable for BGload. any ideas?
thanks in advance