Problem with loop animation with nested movie clips

New Here ,
Aug 15, 2020 Aug 15, 2020

Copy link to clipboard


I am running into an issue with looping an animation for an HTML5 ad I am working on. I add this code to the last frame to loop the animation 2 times and then stop playing at the last frame:

if (!this.looped) this.looped = 1;
if (this.looped++ == 2) this.stop();

It works, sort of. I nested and animated the type inside other movie clips and added it to the main timeline to keep the timeline short. I am controlling the main timeline and nest movie clip timelines by using the following code:

var tl=this;
var delay = 2400;
var startTime=createjs.Ticker.getTime();
function f(e){

I am unable to figure out why when the animation loops the 2nd time the type at the beginning of the ad does not animate in with the correct timing as it did the first time. I looked through the adobe community and online for a solution and cannot find one. I am hoping someone is able to help point me in the right direction. Thank you!


Here is the ad to see what how the animation gets stuck when it loops.


I also included screenshots of how I set up the main timeline and nested movie clip timeline.

Ad development , Code , Timeline







Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation