# Mouse Movment

**URL:** <https://forum.kirupa.com/t/mouse-movment/216753>\
**Category:** flash\
**Created:** [February 20, 2007, 10:33am UTC](https://forum.kirupa.com/t/mouse-movment/216753 "2007-02-20T10:33:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![meetmurali](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@meetmurali](https://forum.kirupa.com/u/meetmurali)\
**Post date:** [February 20, 2007, 10:33am UTC](https://forum.kirupa.com/t/mouse-movment/216753/1 "2007-02-20T10:33:55Z")

</div>

Hi all,

I am using this code for vertical scrolling gallery. How to add the X and Y Positions For Mouse up and Down for the Below code.

if (\_global.chk == undefined) {  
\_global.chk = 1;  
}

mask\_y = getProperty("\_root.main.verti.mask", \_y);  
mask\_h = getProperty("\_root.main.verti.mask", \_height);  
roller\_y = getProperty("\_root.main.verti.roller", \_y);  
roller\_h = getProperty("\_root.main.verti.roller", \_height);

if (\_global.chk == 1) {  
if ((roller\_y+roller\_h)\>(mask\_y+mask\_h)) {  
setProperty("\_root.main.verti.roller", \_y, getProperty("\_root.main.verti.roller", \_y)-3);  
} else {  
\_global.chk = 2;  
}

} else if(\_global.chk == 2) {  
if (roller\_y\<=mask\_h) {  
setProperty("\_root.main.verti.roller", \_y, getProperty("\_root.main.verti.roller", \_y)+3);  
} else {  
\_global.chk = 1;  
}  
}
