Created
March 27, 2015 00:40
-
-
Save gyohk/accc06fef2d1ce872c6e to your computer and use it in GitHub Desktop.
nested timeline using createJS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timeline = new createjs.Timeline([], { start: 0 }, { paused: true }); | |
var timeline2 = new createjs.Timeline([], { start: 0 }, { paused: true }); | |
timeline.addTween( | |
createjs.Tween.get(ellipse).to({ x: 100 }, 500, createjs.Ease.cubicOut), | |
createjs.Tween.get(ellipse2).to({ y: 100 }, 500, createjs.Ease.cubicOut).call(function(){ | |
timeline2.gotoAndPlay('start'); | |
}) | |
); | |
timeline2.addTween( | |
createjs.Tween.get(ellipse).to({ y: 100 }, 500, createjs.Ease.cubicOut), | |
createjs.Tween.get(ellipse2).to({ x: 100 }, 500, createjs.Ease.cubicOut) | |
); | |
timeline.gotoAndPlay("start"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment