# Multiple instances of Movieclips working with AS3

**URL:** <https://forum.kirupa.com/t/multiple-instances-of-movieclips-working-with-as3/292166>\
**Category:** flash\
**Created:** [July 10, 2009, 7:20pm UTC](https://forum.kirupa.com/t/multiple-instances-of-movieclips-working-with-as3/292166 "2009-07-10T19:20:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zm15](https://avatars.discourse-cdn.com/v4/letter/z/bcef8e/32.png) [@zm15](https://forum.kirupa.com/u/zm15)\
**Post date:** [July 10, 2009, 7:20pm UTC](https://forum.kirupa.com/t/multiple-instances-of-movieclips-working-with-as3/292166/1 "2009-07-10T19:20:17Z")

</div>

Here is what i would like to do. I have Multiple movieclips that when you hover over, a info box pops up and stays active until the mouse is moved away from the info box. Simple enough. I have multiple movieclips and i cannot get more than one to work. In order for the movieclip to work the instance name is ‘mc’ and this is the code i am using:

mc.addEventListener(MouseEvent.ROLL\_OVER, overHandler);  
function overHandler(evt:MouseEvent):void {  
mc.gotoAndStop(2);}

mc.addEventListener(MouseEvent.ROLL\_OUT, outHandler);  
function outHandler(evt:MouseEvent):void {  
mc.gotoAndStop(1);}

I have tried duplicating the text and changing it to ‘mc1’ to match the instance name of my other movieclip and get a duplicate error on the ‘function…’ line. When i preview only the ‘mc’ instance works.

What am i doing wrong?

Thanks!
