# Same instance names?

**URL:** <https://forum.kirupa.com/t/same-instance-names/226456>\
**Category:** Uncategorized\
**Created:** [May 21, 2007, 4:11pm UTC](https://forum.kirupa.com/t/same-instance-names/226456 "2007-05-21T16:11:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbstanley](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bigbstanley](https://forum.kirupa.com/u/bigbstanley)\
**Post date:** [May 21, 2007, 4:11pm UTC](https://forum.kirupa.com/t/same-instance-names/226456/1 "2007-05-21T16:11:37Z")

</div>

I’m loading a movie clip onto my stage through xml (a dot). When it does this, it also creates a small list on the side. The user can rollover the different items in the list and the corresponding dot lights up. Here’s my problem. Some list items need several dots. I have it working as far as putting the multiple dots on the stage, however, on the list rollover part I’m having issues.

When the list item should have multiple dots, I am making those dots have the same instance name. I then have a function tell that instance name to run (hoping to have all mc’s with that instance name run) but only one dot works.

Here’s my as.

```auto

function thumbnails_fn(k){
    if (duplicate[k] == "yes") {
        d=d+1;
       // making p equal to original k
        p = k-d;
        flashmap.dots.attachMovie("dot", "dot"+p+"dup", d+99);
        flashmap.dots["dot"+p+"dup"]._x = xpos[k];
        flashmap.dots["dot"+p+"dup"]._y = ypos[k];    
        addbutton = false;
    } 
        
    new_k = k-d;

    if(addbutton) {
        locations_mc.attachMovie("location_bttn", "thumb"+k, k);
        locations_mc["thumb"+k]._y = new_k*18;
        locations_mc["thumb"+k].location_txt.text = locations[k];
    }
    
    addbutton = true;
        
            
        flashmap.dots.attachMovie("dot", "dot"+k, k);
        flashmap.dots["dot"+k]._x = xpos[k];
        flashmap.dots["dot"+k]._y = ypos[k];
        
        
        
        locations_mc["thumb"+k].onRollOver = function(){
            flashmap.dots["dot"+k].dot.play();
            // here's where I'm trying to get all mc's with the same name to play
            flashmap.dots["dot"+k+"dup"].dot.play();
        
        }
        
        locations_mc["thumb"+k].onRollOut = function(){
            flashmap.dots["dot"+k].dot.gotoAndPlay("out");
            // here's where I'm trying to get all mc's with the same name to play
            flashmap.dots["dot"+k+"dup"].dot.gotoAndPlay("out");
        }
    
    
}

```
