# If Statement, rechecking to see if true

**URL:** <https://forum.kirupa.com/t/if-statement-rechecking-to-see-if-true/190237>\
**Category:** Uncategorized\
**Created:** [June 9, 2006, 5:50pm UTC](https://forum.kirupa.com/t/if-statement-rechecking-to-see-if-true/190237 "2006-06-09T17:50:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeradin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jeradin/32/2485_2.png) [@Jeradin](https://forum.kirupa.com/u/Jeradin)\
**Post date:** [June 9, 2006, 5:50pm UTC](https://forum.kirupa.com/t/if-statement-rechecking-to-see-if-true/190237/1 "2006-06-09T17:50:42Z")

</div>

I am working with a movie clipt hat I want to disable some buttons once it moves to a certain position, that position created by some variables.

I placed the below code into a controller moving clip with the code on frame one, and then on frame 2 is gotoAndPlay(1);

```auto

onEnterFrame = function() {
if(textMCBottomPos <= maskMCBottomPos){
          this._parent.upbutton.enabled = false;
     this._parent.upbutton.alphaTo(50, 1);
}
else{
    this._parent.upbutton.enabled = true;
     this._parent.upbutton.alphaTo(100, 1);
}
if(textMCTopPos <= maskMCTopPos){
          this._parent.downbutton.enabled = true;
      this._parent.downbutton.alphaTo(100, 1);
}
else{
          this._parent.downbutton.enabled = false;
      this._parent.downbutton.alphaTo(50, 1);
}
}

```

Here are the variables its pulling from, which are on the first frame of the root movie.

The problem is the if statement only runs once, and does not update… I thought since I have it in a controller movie clip that keeps running the it would update… but it does not.

any help would be greatly appreciated.

```auto

var textMCBottomPos:Number = mover._y + mover._height;
var maskMCBottomPos:Number = stopper._y + stopper._height;
var maskMCTopPos:Number = stopper._y;
var textMCTopPos:Number = mover._y;

```

Thank you,  
Dale
