Expression stops after if...else...statement
Hi,
I am new to expressions and am trying to teach myself from the internet and books. I have set myself a challenge to emulate a horizontal "ticker" line starting from right to left across the screen. When the text reaches a preset position (x=-3200), I want the layer to return to the right hand side and resume moving right to left for as long as the composition time. This is part of a larger project where several layers will follow on in continuous loops in the same manner as seen on TV. I have a simplified expression which I am trying out but as soon as the if statement is triggered the calculations stop and the layer stays at the x=1920 position. I cannot find a way to keep the action running. Am I missing something as I thought the expression was calculated at each frame ?
the expression:
x=position[0];
y=position[1];
x=position[0]+((time-inPoint)*-200);
if (x<-3200) x=1920;
[x,y]
I would be grateful for any help or advice.
Regards
John