# Repeating or looping onRollOver mouse state on button

**URL:** <https://forum.kirupa.com/t/repeating-or-looping-onrollover-mouse-state-on-button/222311>\
**Category:** flash\
**Created:** [April 12, 2007, 1:45pm UTC](https://forum.kirupa.com/t/repeating-or-looping-onrollover-mouse-state-on-button/222311 "2007-04-12T13:45:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuntz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kuntz/32/3511_2.png) [@Kuntz](https://forum.kirupa.com/u/Kuntz)\
**Post date:** [April 12, 2007, 1:45pm UTC](https://forum.kirupa.com/t/repeating-or-looping-onrollover-mouse-state-on-button/222311/1 "2007-04-12T13:45:12Z")

</div>

Hello m8s. I have one scrolling panel and i wont to control this panel with 2 buttons.  
Left and Right. I use onRollOver mouse state and my panel is not animated. I told him how to move with action script:

this.levo\_btn.onRollOver=function() {  
baner\_mc.\_x-=25;  
};

and for going right:

this.desno\_btn.onRollOver=function() {  
baner\_mc.\_x+=25;  
};

How to loop this onRollOver state with AS becouse i dont wont to roll out mouse from button and than back to same button to repeat onRollOver state ?

I also have question how to stop my panel on exact x cordinate ?

I try with

if (baner\_mc.\_x \>=733) {  
baner\_mc.\_x =733;  
}

baner\_mc is instance for scrolling panel

733 is x cordinate for left edge of mu scrolling panel so i wont to stop him on this number when i scroll him right.

right adge is on -384.9

Pleas help me. Thank You !

Vladimir

PS: sorry for my bad english
