To answer your immediate question, you can create your own properties on buttons. I create a property called idx and use it to store the logoCount number.
Then, within the event handler, you can use this.property to refer to the thing you stored.
code:
for (logoCount=1; logoCount<=6; logoCount++)
{
temp = eval("logo"+logoCount);
temp.idx = logoCount; // store it here...
temp.onRollOver = function()
{
scaleFactor[this.idx] = true;
};
temp.onRollOut = function() {
scaleFactor[this.idx] = false;
};
}
If it were me, I probably wouldn't store scaleFactor in a separate array, but would also assign scaleafactor to each individual button, just I'm doing with idx. I like to keep stuff associated with buttons or movieclips in the buttons or movieclips.
code:
for (logoCount=1; logoCount<=6; logoCount++)
{
temp = eval("logo"+logoCount);
temp.onRollOver = function()
{
this.isScaling = true;
};
temp.onRollOut = function() {
this.isScaling = false;
};
}




Reply With Quote