I have a single clip on the stage with an instance name of testShape
. In frame 1 I have the following code:
createjs.Tween.get(this.testShape, {loop:true}).to({y:240}, 1000);
When I run this it loops infinitely as expected but what I want is for it to loop three time then stop and fire a complete
event.
The docs say that the loop param...
Indicates the number of times to loop. If set to -1, the tween will loop continuously.
Which suggests I should be able to set {loop: 3}
to achieve my desired result but any number value other than 0 just causes it to loop endlessly.
Can anyone advise on what I'm doing wrong or how to make a Tween loop n times before completing?
Cheers all