Jump to content


Loop flash banner ad

Recommended Posts

I have a question that is perhaps stupid... Sorry for beginner's level and for my imperfect english too, but I am really confused here.
I am creating a flash banner ad using AS2 (which is usually a requirement) and I have troubles looping it.
Usually I loop my tween animation like this:

var Seq = new TimelineMax({repeat:(-1), repeatDelay:0.5});


and then it goes:

Seq.to(Logo1, 0.6, {_y:55.95, _alpha:100, delay:0.3, ease:Circ.easeInOut});
Seq.to(Plus, 0.6, {_y:87.95, _alpha:100, delay:-0.3, ease:Circ.easeInOut});


etc., etc.


That's all the code I have, except ClickTag on the button.


But now I have to provide flash banners for Google too, and they said my animation is infinite (instead of being under 30s as it supposed to). They suggested to loop it in the last frame, which can't be right because I have only one frame.
So, is there any way that I can loop my banner in a correct way? I remember seeing an elegant solution using function, but I spent few hours looking for it without any luck (and I don't know enough about AS to just write it).


I will be grateful for any help!

Link to comment
Share on other sites

your animation is infinite because you have repeat:-1. You should set repeat to 2 or 3 depending on how long the animation is like


var Seq = new TimelineMax({repeat:2, repeatDelay:0.5});


you can see how long the entire animation is (with repeats) using






Hope that helps

Link to comment
Share on other sites

Thank you very much for your reply!

This will definetely work, but it will also make my animation longer. So, I guess what I'm looking for is a way to make my banner play in loop without putting a number of repeats for the timeline itself... I'm not sure if there is any though.


Thank you very much for the tip about tracing duration, this is extremely helpful.

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.