# Nested onRollOver?

**URL:** <https://forum.kirupa.com/t/nested-onrollover/211793>\
**Category:** flash\
**Created:** [January 5, 2007, 4:24am UTC](https://forum.kirupa.com/t/nested-onrollover/211793 "2007-01-05T04:24:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashpipe](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@flashpipe](https://forum.kirupa.com/u/flashpipe)\
**Post date:** [January 5, 2007, 4:24am UTC](https://forum.kirupa.com/t/nested-onrollover/211793/1 "2007-01-05T04:24:34Z")

</div>

I’ve got a movie clip that you rollover (menu1\_mc) which contains other movie clips (m1\_1, m1\_2, etc.) which also have rollovers. I’ve got the following script in there, but it doesn’t seem to hit the nested clip rollovers. I also attached a sample fla that you can see what’s going on.

Another thing, if anyone may have an idea on this, I also tried making the rollOut do a gotoAndPlay(“out”) so it would look smoother, but I got lots of flickering as it jumped between the in and out frames…very wierd…

```auto
stop();
for (i=1; i<3; i++) {
    this["menu"+i+"_mc"].onRollOver = function() {
        this.gotoAndPlay("in");
        this.swapDepths(1000);
    };
    this["menu"+i+"_mc"].onRollOut = function() {
        this.gotoAndStop(1);
    };
}
menu1_mc.m1_1.onRollOver = function(){
    this.gotoAndStop(2);
}
menu1_mc.m1_1.onRollOut = function(){
    this.gotoAndStop(1);
}
menu1_mc.m1_2.onRollOver = function(){
    this.gotoAndStop(2);
}
menu1_mc.m1_2.onRollOut = function(){
    this.gotoAndStop(1);
}
menu1_mc.m1_3.onRollOver = function(){
    this.gotoAndStop(2);
}
menu1_mc.m1_3.onRollOut = function(){
    this.gotoAndStop(1);
}

```

Thanks!!
