Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

TimelineLite Repeating before Completion

Recommended Posts

Hi! Forgive my rudimentary coding skills and understanding. I'm building out a small banner ad. Very straighforward fades in and out. For some reason this animation keeps resetting to the beginning before its done playing. Can anyone troubleshoot my code and see if I'm missing something? Thanks so much!

It seems to be jumping to the beginning a few lines into // phase 2:

function repeatAd(e:Event=null):void
var theArray:Array = new Array(bkgd2_mc, copy1_mc, copy2_mc, copy3_mc, copy4_mc, copy5_mc, copy6_mc,
  copy7_mc, DMBlogo_mc, greyBox_mc, learnMore_mc, whiteBox_mc);
for (var i:int = 0; i < theArray.length; i++)
theArray[i].alpha = 0;
var imageAni1:TimelineLite = new TimelineLite({onComplete:repeatAd});
// phase 1
imageAni1.append(TweenLite.to(whiteBox_mc, 1, {alpha: .8, scaleY: 1, scaleX: 1, ease:Expo.easeOut, delay:1}));
imageAni1.append(TweenLite.to(copy1_mc, 1, {alpha: 1, scaleY: 1, scaleX: 1, ease:Expo.easeOut}), -.5);
imageAni1.append(TweenLite.to(copy1_mc, 1, {alpha: 0, ease:Expo.easeOut}), 1);
imageAni1.append(TweenLite.to(copy2_mc, 2, {alpha: 1, ease:Expo.easeOut}), -.5);
// phase 2
imageAni1.append(TweenLite.to(bkgd2_mc, 2, {alpha: 1, ease:Expo.easeOut}));
imageAni1.append(TweenLite.to(copy3_mc, 2, {alpha: 1, scaleY: 1, scaleX: 1, ease:Expo.easeOut}), -.5);
imageAni1.append(TweenLite.to(greyBox_mc, 2, {alpha: 1, ease:Expo.easeOut}), -2);
imageAni1.append(TweenLite.to(copy3_mc, .5, {alpha: 0, ease:Expo.easeOut}));
imageAni1.append(TweenLite.to(copy4_mc, 2, {alpha: 1, scaleY: 1, scaleX: 1, ease:Expo.easeOut}));
imageAni1.append(TweenLite.to(copy5_mc, 2, {alpha: 1, scaleY: 1, scaleX: 1, ease:Expo.easeOut}));
imageAni1.append(TweenLite.to(copy6_mc, 2, {alpha: 1, scaleY: 1, scaleX: 1, ease:Expo.easeOut}));
Link to comment
Share on other sites



It sounds like the main timeline may be playing and repeating. Do you have extra frames in any layers? Try adding a stop action at the bottom of your code





If that doesn't work please zip your fla and post it here. The more you can simplify it (remove tweens) the better.

  • Like 1
Link to comment
Share on other sites

Oh my gosh, thank you, Carl! For whatever reason, I DID have a bunch of extra frames on a number of layers. Deleted them all and I'm back in business. Thanks so much!

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.