If statement issues (basic)


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

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

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

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");