I am trying to convert the longer code i have below into shorter codes, the codes that i have is for Actionscript 2, while i am using as2 debugger, trace(), its getting the loop, however it will not recognize that is a movieclip (button1 - button3 are 3 different movie clips that i assigned).
from this
button1.onRollOver = function(){
m_bt1.scaleTo(70, 1, "easeoutelastic");
};
button1.onRollOut = function(){
m_bt1.scaleTo(100, 1, "easeoutelastic");
};
button2.onRollOver = function(){
m_bt2.scaleTo(70, 1, "easeoutelastic");
};
button2.onRollOut = function(){
m_bt2.scaleTo(100, 1, "easeoutelastic");
};
button3.onRollOver = function(){
m_bt3.scaleTo(70, 1, "easeoutelastic");
};
button3.onRollOut = function(){
m_bt3.scaleTo(100, 1, "easeoutelastic");
};
to this:
var $i;
for($i=1; $i <4; $i++){
var main_bt = 'button'+$i;
_root.main_bt.onRollOut = function(){
this.main_bt.scaleTo(70, 1, "easeoutelastic");
}
}