# Tween\\Class Problem - Why the loop doesn't work?

**URL:** <https://forum.kirupa.com/t/tween-class-problem-why-the-loop-doesnt-work/214505>\
**Category:** flash\
**Created:** [January 29, 2007, 6:00pm UTC](https://forum.kirupa.com/t/tween-class-problem-why-the-loop-doesnt-work/214505 "2007-01-29T18:00:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegooriani](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/diegooriani/32/3232_2.png) [@diegooriani](https://forum.kirupa.com/u/diegooriani)\
**Post date:** [January 29, 2007, 6:00pm UTC](https://forum.kirupa.com/t/tween-class-problem-why-the-loop-doesnt-work/214505/1 "2007-01-29T18:00:27Z")

</div>

```auto
for(i=0;i<6;i++){
	b_loop = _root.mc_menu["b_0"+i];
	b_loop.thisNum = i;
	
//

import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.Strong;

var totalBlur:Number = 5;
var noBlur :Number = 0;

var blur:BlurFilter = new BlurFilter(totalBlur, totalBlur, 3);
b_loop.filters = new Array(blur);

var blurTween:Tween;
b_loop.onRollOver = function() {
	
	blurTween = new Tween(blur, "blurX", Strong.easeOut, blur.blurX, noBlur, 1.0, true);
	blurTween.onMotionChanged = function() { 
	blur.blurY = blur.blurX;
	b_loop.filters = new Array(blur);
	
	}
}

b_loop.onRollOut = function() {
	
	blurTween = new Tween(blur, "blurX", Strong.easeOut, blur.blurX, totalBlur, 1.0, true);
	blurTween.onMotionChanged = function() { 
    blur.blurY = blur.blurX;
    b_loop.filters = new Array(blur);
		
	}
  }
}

```

So strange. When I try without the loop the action works normally, but when added the looping that’s it. Stop to work.

Does anyone know why?

Another question, I am trying to apply the elastic tweening as well but is not working at all. Can I have more the one Tween\Class by MC?

Cheers,  
Diego
