# Mouse slider problem

**URL:** <https://forum.kirupa.com/t/mouse-slider-problem/240861>\
**Category:** Uncategorized\
**Created:** [October 7, 2007, 1:48pm UTC](https://forum.kirupa.com/t/mouse-slider-problem/240861 "2007-10-07T13:48:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crystalmedia](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@crystalmedia](https://forum.kirupa.com/u/crystalmedia)\
**Post date:** [October 7, 2007, 1:48pm UTC](https://forum.kirupa.com/t/mouse-slider-problem/240861/1 "2007-10-07T13:48:53Z")

</div>

Hi,  
I want to create a picture gallery that has for example 14 movieClips (everyone has a box) horizontally lined up and distance between them to be 10pixels. The width of the scroll stage is Stage.width and depending on \_xmouse position it moves left/right. I have made that in the code below:

```auto
centar = Stage.width/2;
sirina = Stage.width;
desniKraj = Stage.width/2 - nav._width/2;
leviKraj = Stage.width/2 + nav._width/2;
max_Speed;
nav.onEnterFrame = function() {  
    nav._x = nav._x - ((_xmouse-centar)/sirina)*max_Speed;
    
    if(nav._x < desniKraj && _xmouse > Stage.width/2) {
        max_Speed = 0;
        
    } else if(nav._x > leviKraj && _xmouse < Stage.width/2) {
        max_Speed = 0;
        
    } else {
        max_Speed = 100;
    }
    } 

```

How do i create, that when you roll over on one of the movieClips the clip resizes larger (gradually/dynamically) and of course the other clips move so that the distance of every movie clip is ALWAYS 10pixels???
