# Looping?

**URL:** <https://forum.kirupa.com/t/looping/266557>\
**Category:** Uncategorized\
**Created:** [July 22, 2008, 3:16am UTC](https://forum.kirupa.com/t/looping/266557 "2008-07-22T03:16:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Texpride12](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@Texpride12](https://forum.kirupa.com/u/Texpride12)\
**Post date:** [July 22, 2008, 3:16am UTC](https://forum.kirupa.com/t/looping/266557/1 "2008-07-22T03:16:23Z")

</div>

//so i have some script that changes a few of my movies clips \_alpha properties. One fades in and one fades out. Basically an on/ off state. It looks like this//

function filleron() {alphaTween = new mx.transitions.Tween (filler, “\_alpha”,  
mx.transitions.easing.Regular.easeOut, 0, 100, 5,  
true);  
}

function filleroff() {alphaTween = new mx.transitions.Tween (filler, “\_alpha”,  
mx.transitions.easing.Regular.easeOut, 100, 0, 5,  
true);  
}

// Now what I am trying to do is create a menu bar with buttons that when clicked, turn off one particular clip and then turn another on after ther first movieclips \_alpha is less than a certain number. I am trying to accomplish this with a while statement that does not seem to be looping correctly. Here is what I have//

this.\_contact.onRelease = function(){  
filleroff();  
while (filler.\_alpha \> 50) {  
cvr3bdron();  
break;

```
  }

```

//this code works when I change the opperand in the condition to \< 50 so to me it looks like it makes the test the first time and sees that the \_alpha of filler is greater than 50 and it proceeds with the function cvr3bdron(). However I don’t want cvr3bdr to fade in until fillers \_alpha is less than 50. Does anyone know where I am going wrong. This would be a great help.
