# Making a mc inside a dup mc a button

**URL:** <https://forum.kirupa.com/t/making-a-mc-inside-a-dup-mc-a-button/171099>\
**Category:** Uncategorized\
**Created:** [December 1, 2005, 8:35pm UTC](https://forum.kirupa.com/t/making-a-mc-inside-a-dup-mc-a-button/171099 "2005-12-01T20:35:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samurai](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@Samurai](https://forum.kirupa.com/u/Samurai)\
**Post date:** [December 1, 2005, 8:35pm UTC](https://forum.kirupa.com/t/making-a-mc-inside-a-dup-mc-a-button/171099/1 "2005-12-01T20:35:29Z")

</div>

Hey, I have a question,

I have a mc that is duplicated. the duplicates have stuff in them. One of these things is another mc. I want that mc to trigger the onRollOver and onRollOut functions for the shell mc (the one that houses the mc that has the rollover/out actions), and I want it to have a hit area of only that inner mc, not the whole shell mc. How can I achieve this?

here’s my code:

```auto

for (var i = 0; i<rows; i++) {
        var thematrix = smile.duplicateMovieClip("smile"+i, i);
        //var images = thematrix.createEmptyMovieClip("image"+i, i);
        var thebutton = thematrix.invis_button;
        var thumbHolder = thematrix.image_mc;
        var largeHolder = thematrix.large_image_mc;
        var bodytext = thematrix.body_text_mc;
        var title = thematrix.txt_mc;
        picHolder = this.firstChild.childNodes*;
        bodytext.body_text.text = picHolder.attributes.body;
        title.txt.text = picHolder.attributes.title;
        thumbHolder.loadMovie(picHolder.attributes.thmb);
        largeHolder.loadMovie(picHolder.attributes.large);
        //images.loadMovie(picHolder.attributes.thmb, 0);
        thematrix._x = xpos+(wclip+hspace)*(i%columns);
        thematrix._y = ypos+(hclip+vspace)*Math.floor(i/columns);
        thematrix.thebutton.onRollOver=function(){
            thematrix.onRollOver=function(){
            //this.gotoAndPlay(2);
            //thematrix.images._visible = false;
            //_root.swapper += 1000;
            //_root.thematrix*.swapDepths(_root.swapper);
            if (this.getDepth() != 1000) {
                this.swapDepths(1000);
            }
            //this.image_mc._xscale += 1000;
            //this.image_mc._yscale += 1000;
            //this.image_mc.xpos = 1000;
            //this.image_mc._visible = false;
            this.gotoAndPlay(2);
            }
            
        }
        thematrix.onRollOut=function(){
            //thematrix._xscale -= 20;
            //thematrix._yscale -= 20;
            //this.image._xscale -= 20;
            //this.image._yscale -= 20;
            this.swapDepths(1000);
            this.gotoAndPlay(8);
            //this.image_mc._xscale -= 1000;
            //this.image_mc._yscale -= 1000;
            //this.image_mc.xpos -= 1000;
            //this.gotoAndPlay(8);
        }

```

thanks for helping.
