# Move dynamic mask movie.. with Mouse movement

**URL:** <https://forum.kirupa.com/t/move-dynamic-mask-movie-with-mouse-movement/210365>\
**Category:** Uncategorized\
**Created:** [December 18, 2006, 7:43am UTC](https://forum.kirupa.com/t/move-dynamic-mask-movie-with-mouse-movement/210365 "2006-12-18T07:43:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![log](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@log](https://forum.kirupa.com/u/log)\
**Post date:** [December 18, 2006, 7:43am UTC](https://forum.kirupa.com/t/move-dynamic-mask-movie-with-mouse-movement/210365/1 "2006-12-18T07:43:47Z")

</div>

Hi everyone, hi like to move my masked dynamic menù, at right and left by mouse move on mask area. I’ve use an conditions to force the sliding but it doesnt work fine. My mask area is large 973 px

This is the code i ve.

```auto
MovieClip.prototype.easeX = function(x) {
    this.onEnterFrame = function() {
        this._x = x-(x-this._x)/1.2;
        if (Math.abs(x-this._x)<=1) {
            //delete this.onEnterFrame;
            this._x = x;
        }
    };
};

```

```auto

this.onEnterFrame= function() {
        if (_root.mask.hitTest(_root._xmouse, _root._ymouse)) {
            slideMenu();
        }
    };

```

```auto
slideMenu = function () {
    if (_root._xmouse>782) {
        this.container.easeY(-214);
    } else {
        this.container.easeY(88);
    }
};

```

Anyone can help me??
