Jump to content
Search Community

Need to stop looping once it is done ....

learner_7n test
Moderator Tag

Recommended Posts

Hi,

 

I have to stop looping once it is done. But It is continuosly looping. The following is the code: How to modify it?

 

stop();

import com.greensock.*; 
import com.greensock.easing.*; 

var TA:TimelineMax = new TimelineMax({repeat:-1});
TA.append( TweenMax.to(Logo, 2, {x:500, y:342.5, delay:0.5, ease:Strong.easeOut}));
TA.append( TweenMax.to(Logo, 2, {x:-500, delay:6}));
TA.append( TweenMax.to(Banner, 2, {rotation:0, delay:1, ease:Strong.easeOut}));
TA.append( TweenMax.to(Banner, 2, {x:1000, delay:3, ease:Strong.easeOut}));

Regards.

Link to comment
Share on other sites

You are repeating infinitely with repeat : -1

 

Try this:

stop();

import com.greensock.*; 
import com.greensock.easing.*; 

var TA:TimelineMax = new TimelineMax({repeat:1}); // substitute -1 with +1
TA.append( TweenMax.to(Logo, 2, {x:500, y:342.5, delay:0.5, ease:Strong.easeOut}));
TA.append( TweenMax.to(Logo, 2, {x:-500, delay:6}));
TA.append( TweenMax.to(Banner, 2, {rotation:0, delay:1, ease:Strong.easeOut}));
TA.append( TweenMax.to(Banner, 2, {x:1000, delay:3, ease:Strong.easeOut}));

Link to comment
Share on other sites

does it loop more than once?

 

if you don't want it to repeat at all, remove {repeat:1}

 

if your code you show is the only thing in your movie, and nothing else is forcing that code to execute a second time such as the flash IDE timeline looping... your TA will play only once.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...