Skip to main content
December 11, 2009
Question

How to hold a texts scroll for 3 seconds then scroll off?

  • December 11, 2009
  • 1 reply
  • 600 views

I'm using tweenlite. How do I hold the scroll for 3 seconds and scroll off the screen?

Here is my current tweenlite code.

TweenLite.to(txtField, 40, {x:-stage.stageWidth*2.25, ease:Linear.easeNone, delay:0.5, onComplete:Inspiration});

Thank you.

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
December 11, 2009

Look into using the Timer class to manage having things working on a timed basis.  You should be able to find explanation and examples in the help documents.

December 11, 2009

Thanks! I will check the Timer class. At first I was wondering if there is a hold in the tweenlite class.

December 11, 2009

Okay, I'm not getting what I wanted. Here is my code:

TweenLite.to(txtField, 3, {x:200, ease:Linear.easeNone, delay:0.5});

var timer:Timer = new Timer(3000, 2);
    timer.addEventListener(TimerEvent.TIMER, scrollOut);
    timer.start();

function scrollOut(e:TimerEvent):void{
    TweenLite.to(txtField, 3, {x:-200, ease:Linear.easeNone, delay:0.5, onComplete:Inspiration});
}

I want the tweenlite to wait 3 seconds and the proceede with scroll off the screen that's why I have the scrollOut function; however, the effect is that the scrolling from right is pausing for 3 seconds every 2 seconds. How do I modify this?