createjs - How can i add oncomplete evetn to movie clip generated from animate CC exporter -


i have canvas project created animate cc , need add "oncomplete" event movie clip generated animate cc canvas project , solution present createjs site :

target.alpha = 1; createjs.tween.get(target)      .wait(500)      .to({alpha:0, visible:false}, 1000)      .call(handlecomplete); function handlecomplete() {     //tween complete } 

from tweenjs site

i don't want modify js file generated animate cc , not find way hock movie clip tween i've tried access exportroot.mymovieclipinstancename.timeline tween not lock

regards

you shouldn't need access timeline directly -- movieclips fire "animationend" event when timeline complete. anywhere should able do:

exportroot.instance.on("animationend", function(e) {   console.log(e); }); 

you add code timeline in animate, same thing.

this.on("animationend", function(e) {   console.log(e); }); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -