Quick fix ... hopefully

Can someone tell me why this does not work? buttonName apparently isn’t registering as an Object, as I can’t control the movieclips which exist in the same timeline.

The trace() returns the correct name, however without the path.

Code:


buttonNum = 8; 
for(i=1; i<=buttonNum; i++) { 
   var buttonName:Object = "nav" + i + "_mc"; 
   trace(buttonName); 
   buttonName.onRollOver = buttonName.onDragOver = function() { 
      trace("mouseOver"); 
   } 
}

Thanks in advance!