# Quick fix ... hopefully

**URL:** <https://forum.kirupa.com/t/quick-fix-hopefully/205762>\
**Category:** Uncategorized\
**Created:** [November 1, 2006, 6:20pm UTC](https://forum.kirupa.com/t/quick-fix-hopefully/205762 "2006-11-01T18:20:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![knappster](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@knappster](https://forum.kirupa.com/u/knappster)\
**Post date:** [November 1, 2006, 6:20pm UTC](https://forum.kirupa.com/t/quick-fix-hopefully/205762/1 "2006-11-01T18:20:52Z")

</div>

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:

```auto

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!
