Skip to content

Instantly share code, notes, and snippets.

@gyohk
Created March 27, 2015 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gyohk/accc06fef2d1ce872c6e to your computer and use it in GitHub Desktop.
Save gyohk/accc06fef2d1ce872c6e to your computer and use it in GitHub Desktop.
nested timeline using createJS.
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