Creativcheck Creativcheck - 7 months ago 93
ActionScript Question

Adobe Animate canvas play() not work

I making a banner with Adobe Animate CC on the canvas (html5). And I encountered a problem.

Why simple this.stop() inside movieclip code is working (like good old ActionScript), but make error: is not a function. WTF?!

How can I make my timeline stop and play the animation when I want?

Full code below:

window.setTimeout(go, 2000);

function go()


the problem is "this". This inside a function do not refer to the main stage movie clip any more - it refers to the function. Add a line before your function:

var that=this;

and change the line inside your function to:;