Hi - if you look at the code:: barn is an instance of an MC on stage.
I have a few buttons stored in an array which i want to attach scripts with a for loop.
Why does adding an item from the array not work when placed inside the function call?
var characters:array = new Array("barn");
function over()
{
dosomthing();
}
function attachScripts(mc)
{
mc.onRollOver = over;
mc.forceSmoothing = true;
}
////////////////method below works/////////////
attachScripts(barn);
////////////method below does not work////////////
for(i=0;i<characters.length;i++)
{
attachScripts(characters*);
}
Thanks!!