# Movieclip within movieclip onRelease

**URL:** <https://forum.kirupa.com/t/movieclip-within-movieclip-onrelease/231405>\
**Category:** Uncategorized\
**Created:** [July 4, 2007, 2:12pm UTC](https://forum.kirupa.com/t/movieclip-within-movieclip-onrelease/231405 "2007-07-04T14:12:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bardic](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bardic/32/3708_2.png) [@bardic](https://forum.kirupa.com/u/bardic)\
**Post date:** [July 4, 2007, 2:12pm UTC](https://forum.kirupa.com/t/movieclip-within-movieclip-onrelease/231405/1 "2007-07-04T14:12:56Z")

</div>

This probably has a simple solution, but I’m not seeing it. I have created a MC within a MC. The inner MC has an onRelease on it, but it won’t fire.  
I think the problem is that it is within the other MC and flash only wants to fire the outer MCs mouse functions… am I right? And if I am how would I go about getting it to using the inner MCs onRelease.

If I’m wrong, again, how would I fix it? Below is the snippet of code that is causing me problems.

A link to a guide or a reference about this would be great 🙂 Thanks in advance for your time.

```auto

if(xml*.nodeName == "m"){                
            menuWidth = mainMenu[xml*.attributes.n]._width;
            mainMenu[xml*.attributes.n].id = i;
            mainMenu[xml*.attributes.n].onRollOver = function(){    
                subMenuY = 0;
                for(ii=0;ii<xml[this.id].childNodes.length;ii++){
                    subMenu = xml[this.id].childNodes;
                    mainMenu[xml[this.id].attributes.n].createEmptyMovieClip(subMenu[ii].attributes.n,this.getNextHighestDepth());
                    mainMenu[xml[this.id].attributes.n][subMenu[ii].attributes.n].createTextField(subMenu[ii].attributes.tf,mainMenu[xml[this.id].attributes.n].getNextHighestDepth(),0,subMenuY,50,20);
                    mainMenu[xml[this.id].attributes.n][subMenu[ii].attributes.n][subMenu[ii].attributes.tf].text = subMenu[ii].attributes.n;
                    mainMenu[xml[this.id].attributes.n][subMenu[ii].attributes.n]._x =menuWidth;
                    mainMenu[xml[this.id].attributes.n][subMenu[ii].attributes.n]._y = 0;
                    subMenuY += 15;
                    
                    mainMenu[xml[this.id].attributes.n][subMenu[ii].attributes.n].onRelease = function(){
                        pl = subMenu[ii].attributes.dl;
                        trace(pl);
                        funcSite(pl);
                    }
                }
            }
            mainMenu[xml*.attributes.n].onRollOut = function(){
                for(ii=0;ii<xml[this.id].childNodes.length;ii++){
                    mainMenu[xml[this.id].attributes.n][subMenu[ii].attributes.n].removeMovieClip();
                }
            }
        }

```
