0

I have been trying to find a way of delaying the running for the JS code in a HTML canvas document. I know how it is done with TweenJS see below:

I know how it is done with TweenJS see below:

createjs.Tween.get(this.movieClip).wait(200).to({scaleX:1.10,scaleY:1.10}, 100, createjs.Ease.quadOut);

But I want to delay or wait in running the following code instead of waiting on a tween:

this.movieClip.gotoAndPlay("frameName");

Karl
  • 854
  • 9
  • 21

1 Answers1

0

With help from JoãoCésar Use the setTimeout method.

var root = this;  
setTimeout(function()  
{  
    root.movieClip.gotoAndPlay("frameName");  
}, 200);