Copy link to clipboard
Copied
Working in Animate CC version 18 on PC. How can I create a timed (say 2 seconds) pause.
If this is AS3:
stop();
setTimeout(play, 2000);
If this is HTML5 Canvas:
this.stop();
setTimeout(this.play.bind(this), 2000);
Copy link to clipboard
Copied
Insert two seconds of nothing happening in your timeline?
You don't say what you want to happen after the pause so we're kind of limited in how specific a response to give. If this is in code you use setTimeout().
Copy link to clipboard
Copied
I would like for the movie to continue with the next frame.
Copy link to clipboard
Copied
If this is AS3:
stop();
setTimeout(play, 2000);
If this is HTML5 Canvas:
this.stop();
setTimeout(this.play.bind(this), 2000);
Copy link to clipboard
Copied
I thought about bind, but wasn't sure if it worked with setTimeout.
Copy link to clipboard
Copied
A function's a function. I was surprised that "this.play" by itself didn't work. I'd have thought that one "this" would have been enough to nail down the scope, but apparently not.
Copy link to clipboard
Copied
This script in the timeline should do it:
var _this = this;
this.stop();
setTimeout(doPlay,2000);
function doPlay(){
_this.play();
}
That works for AS3 and Canvas. If you're just doing AS3 you can do this:
stop();
setTimeout(play,2000);
Find more inspiration, events, and resources on the new Adobe Community
Explore Now