Share Posted September 27, 2013 Hello, I have a question about tweens that have a delay at the beginning. //init var highScoreTween:TweenLite= new TweenLite(highScore, 0.4, { delay:1, alpha:1 } ); //here is the question if (highScoreTween.time() < highScoreTween.duration()) { highScoreTween.seek(highScoreTween.duration()); } If I want to check tween for activity, when it has already started, but delay time has not passed. The function time() returns 0 and propertie _active is false. How can I know that this tween has already begun? Link to comment Share on other sites More sharing options...
Share Posted September 28, 2013 Right, the delay just affects where the tween gets positioned on its parent timeline, but the tween isn't somehow "active" during its delay period (I think that would be counter-intuitive). You can easily get the info you're after, though, like this: var timelineTime = highScoreTween.timeline.time(); var tweenStart = highScoreTween.startTime(); if (timelineTime > tweenStart - highScoreTween.delay() && timelineTime < tweenStart) { //it's inbetween the delay and the start } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now