# If statement issues (basic)

**URL:** https://forum.kirupa.com/t/if-statement-issues-basic/292319
**Category:** flash
**Created:** [July 13, 2009, 11:36am UTC](https://forum.kirupa.com/t/if-statement-issues-basic/292319 "2009-07-13T11:36:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ricky55](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ricky55](https://forum.kirupa.com/u/Ricky55)
#### Post date: [July 13, 2009, 11:36am UTC](https://forum.kirupa.com/t/if-statement-issues-basic/292319/1 "2009-07-13T11:36:56Z")

</div>

Hi

I’m creating a vertical news scroller, that will eventually load in from an external text file and then just scroll the text in a movie clip vertically.

I have this working but I have a couple of questions.

1. As the text reaches the end of the scroll I want it to start to fade out, I’ve added a IF statement to do this but it doesn’t seem to fire. Why is this?

2. Even though I don’t have any easing the scroll seems to slow down as its nearing the end of the animation, do you know why this is happening?

Thanks very much

my code

```auto

import gs.TweenLite;
import gs.easing.*;

var myTimer:Timer = new Timer(0,1);
myTimer.addEventListener(TimerEvent.TIMER, scrollNow);
myTimer.start();

function scrollNow (event:Event):void
{
	TweenLite.to(scroller_mc, 18, {y:-902, onComplete:onFinishTween });
	if (scroller_mc.y <= -800) {
		TweenLite.to(scroller_mc, 1, {alpha:0});
		trace("Less that -800");
	}
	function onFinishTween () {
		scroller_mc.y = 410;
		trace("Tween Finished");
		myTimer.start();
	}
}

```
