Timeline Stopping


#1

I’m trying to play a timeline in one direction for a specific amount of time (200 milliseconds in this case).
It seems simple to do with the z.after function and the z.timeline play() and stop() functions. But the stop() function doesn’t seem to be firing. What am I doing wrong?

function stopTimeline(){
symbol.controllers.hat_move.elements.Hat_MoveRight.stop();
}

symbol.controllers.hat_move.elements.Hat_MoveRight.play();

Z.after(200, stopTimeline);


#2

I think you for got the ().
Z.after(200, stopTimeline());

Steve