# Problems with RollOver and RollOut

**URL:** <https://forum.kirupa.com/t/problems-with-rollover-and-rollout/168780>\
**Category:** flash\
**Created:** [November 9, 2005, 11:58pm UTC](https://forum.kirupa.com/t/problems-with-rollover-and-rollout/168780 "2005-11-09T23:58:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![angaturama](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@angaturama](https://forum.kirupa.com/u/angaturama)\
**Post date:** [November 9, 2005, 11:58pm UTC](https://forum.kirupa.com/t/problems-with-rollover-and-rollout/168780/1 "2005-11-09T23:58:23Z")

</div>

hi  
i gotta question, i’m trying to simulate something similar to the rollOver Scrolling menu in this site [http://www.dhondt-deuren-trappen.be/](http://www.dhondt-deuren-trappen.be/).

I tried with the Flash MX 2004 Undocumented Tween/Easing Classes Documented and it works fine, but… if i move the mouse fast over the rollover images evrything got messy, so i might be doin’ something wrong.

i also tried with onEnterFrame and i got the same problem.

could someone please help me to fix this code, or point me towards the way to get the things right

thanks in advance for any reply, greetings Davis

here it’s a little bit of the code i’m using

````auto
photos.photo1.onRollOver = function() {
	ab();
};
photos.photo1.onRollOut = function() {
	abr();
};
function ab() {
	new mx.transitions.Tween(photos.photo1.mascara1, "_width", mx.transitions.easing.Strong.easeOut, photos.photo1.mascara1._width, 170, 1, true);
	//new mx.transitions.Tween(azul_bajo, "_width", mx.transitions.easing.Strong.easeOut, azul_bajo._width, 170, 1, true);
	new mx.transitions.Tween(photos.photo2, "_x", mx.transitions.easing.Strong.easeOut, photos.photo2._x, 687, 1, true);
	new mx.transitions.Tween(photos.photo3, "_x", mx.transitions.easing.Strong.easeOut, photos.photo3._x, 832, 1, true);
	new mx.transitions.Tween(photos.photo4, "_x", mx.transitions.easing.Strong.easeOut, photos.photo4._x, 978, 1, true);
	//
	new mx.transitions.Tween(photos.photo1.color1, "_x", mx.transitions.easing.Strong.easeOut, photos.photo1.color1._x, 174, 1, true);
	new mx.transitions.Tween(photos.photo1.color1, "_width", mx.transitions.easing.Strong.easeOut, photos.photo1.color1._width, 405, 1, true);
	//new mx.transitions.Tween(photos.photo1.color1, "_alpha", mx.transitions.easing.Strong.easeOut, photos.photo1.color1._alpha, 100, 1, true);
}
//
function abr() {
	new mx.transitions.Tween(photos.photo1.mascara1, "_width", mx.transitions.easing.Strong.easeOut, photos.photo1.mascara1._width, 142, 1, true);
	//new mx.transitions.Tween(azul_bajo, "_width", mx.transitions.easing.Strong.easeOut, azul_bajo._width, 144, 1, true);
	new mx.transitions.Tween(photos.photo2, "_x", mx.transitions.easing.Strong.easeOut, photos.photo2._x, 144.9, 1.5, true);
	new mx.transitions.Tween(photos.photo3, "_x", mx.transitions.easing.Strong.easeOut, photos.photo3._x, 290.1, 1.7, true);
	new mx.transitions.Tween(photos.photo4, "_x", mx.transitions.easing.Strong.easeOut, photos.photo4._x, 435.7, 1.9, true);
	//--
	//new mx.transitions.Tween(photo4, "_x", mx.transitions.easing.Strong.easeOut, photo4._x, 1000, .5, true);
	//
	new mx.transitions.Tween(photos.photo1.color1, "_x", mx.transitions.easing.Strong.easeOut, photos.photo1.color1._x, 100, 1, true);
	new mx.transitions.Tween(photos.photo1.color1, "_width", mx.transitions.easing.Strong.easeOut, photos.photo1.color1._width, 0, 1, true);
	
}
//===================================================================
//===================================================================

photos.photo2.onRollOver = function() {
	rb();
};
 
```html
//
photos.photo2.onRollOut = function() {
	rbr();
};

//
function rb() {
	new mx.transitions.Tween(photos.photo2.mask2, "_width", mx.transitions.easing.Strong.easeOut, photos.photo1.mask1._width, 170, 1, true);
	//new mx.transitions.Tween(azul_bajo, "_width", mx.transitions.easing.Strong.easeOut, azul_bajo._width, 170, 1, true);
	new mx.transitions.Tween(photos.photo1, "_x", mx.transitions.easing.Strong.easeOut, photos.photo1._x, -150, 1, true);
	new mx.transitions.Tween(photos.photo2, "_x", mx.transitions.easing.Strong.easeOut, photos.photo2._x, 0, 1, true);
	new mx.transitions.Tween(photos.photo3, "_x", mx.transitions.easing.Strong.easeOut, photos.photo3._x, 900, 1, true);
	new mx.transitions.Tween(photos.photo4, "_x", mx.transitions.easing.Strong.easeOut, photos.photo4._x, 1010, 1, true);
	//
	new mx.transitions.Tween(photos.photo2.color2, "_x", mx.transitions.easing.Strong.easeOut, photos.photo2.color2._x, 174, 1, true);
	new mx.transitions.Tween(photos.photo2.color2, "_width", mx.transitions.easing.Strong.easeOut, photos.photo2.color2._width, 405, 1, true);
	//

}
//
function rbr() {
	new mx.transitions.Tween(photos.photo2.mask2, "_width", mx.transitions.easing.Strong.easeOut, photos.photo2.mask2._width, 142, 1, true);
	//new mx.transitions.Tween(azul_bajo, "_width", mx.transitions.easing.Strong.easeOut, azul_bajo._width, 142, 1, true);
	new mx.transitions.Tween(photos.photo1, "_x", mx.transitions.easing.Strong.easeOut, photos.photo1._x, 0, 2, true);
	new mx.transitions.Tween(photos.photo2, "_x", mx.transitions.easing.Strong.easeOut, photos.photo2._x, 144.9, 1.5, true);
	new mx.transitions.Tween(photos.photo3, "_x", mx.transitions.easing.Strong.easeOut, photos.photo3._x, 290.1, 1.7, true);
	new mx.transitions.Tween(photos.photo4, "_x", mx.transitions.easing.Strong.easeOut, photos.photo4._x, 435.7, 1.9, true);
	//
	new mx.transitions.Tween(photos.photo2.color2, "_x", mx.transitions.easing.Strong.easeOut, photos.photo2.color2._x, 100, 1, true);
	new mx.transitions.Tween(photos.photo2.color2, "_width", mx.transitions.easing.Strong.easeOut, photos.photo2.color2._width, 0, 1, true);
	//

}

````
