I am trying to take this code and make it into a loop.
ActionScript Code:
b1.onRelease = function(){
specificItem(0);
}
b2.onRelease = function(){
specificItem(1);
}
b3.onRelease = function(){
specificItem(2);
}
b4.onRelease = function(){
specificItem(3);
}
b5.onRelease = function(){
specificItem(4);
}
b6.onRelease = function(){
specificItem(5);
}
b7.onRelease = function(){
specificItem(6);
}
b8.onRelease = function(){
specificItem(7);
}
b9.onRelease = function(){
specificItem(8);
}
b10.onRelease = function(){
specificItem(9);
}
Can someone tell me why this isnt working?
ActionScript Code:
for(i=1;i>=10;i++){
eval("b"+i).onRelease = function(){
eval("specificItem("+i-1+")");
}
}
Thanks.
Version 2 En Route - http://www.johnsonmedia.net