# onRollOver & onRollOut problem

**URL:** https://forum.kirupa.com/t/onrollover-onrollout-problem/207756
**Category:** flash
**Created:** [November 21, 2006, 8:03am UTC](https://forum.kirupa.com/t/onrollover-onrollout-problem/207756 "2006-11-21T08:03:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jbailey](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jbailey/32/2380_2.png) [@jbailey](https://forum.kirupa.com/u/jbailey)
#### Post date: [November 21, 2006, 8:03am UTC](https://forum.kirupa.com/t/onrollover-onrollout-problem/207756/1 "2006-11-21T08:03:11Z")

</div>

**what**  
The below code does not work. Why? It won’t preform the deletion of the onEnterFrame MC or something. Read why for more info.

```auto

menuItems.hitpoint.onRollOver = function(){
    menuItems.holder._x = menuItems.alignShow._x;
    this._parent._parent.createEmptyMovieClip("troll", 1000);
    this._parent._parent.troll.onEnterFrame = function() {
        this._parent.menuItems.onRollOut = function(){
            menuItems.holder._x = menuItems.alignHide._x;
            delete this._parent.troll.onEnterFrame;
        }
    }
}

```

**why**  
I have a MC that I’m reusing four times (sort of like a menu). I’m changing the text within each dynamically. All that is working. However, I want to be able to rollOver the title name (the text I mentioned a sentence a go) and then the rollOut be for the entire MC not just the hitpoint. _ **Any ideas?** _
