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 }
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
Post a Comment