I have a script like this to assign a number of buttons to change a variable on rollover:
code:
for (logoCount=1; logoCount<=6; logoCount++) {
temp = eval("logo"+logoCount);
temp.onRollOver = function() {
scaleFactor[logoCount] = true;
};
temp.onRollOut = function() {
scaleFactor[logoCount] = false;
};
}
The problem I have is the scaleFactor array gets assigned to the variable named logoCount when you rollOver any of the move clips. So rolling over logo1 makes scaleFactor[logoCount]=true, but logoCount is irrelavant after this loop is done. I want it so when you rollOver logo1 then scaleFactor[1]=true and rolling over logo2 then scaleFactor[2]=true and so on. Anyone know a looping way to do this?




Reply With Quote