0

I have a movieclip that I want to move in increments (each incremental move should have the easing applied). To get the clip to animate after the first movement I use:

var sheepMoveX:Tween = new Tween (inst_sheep, "_x", Regular.easeOut, 1142, 1092, 10, false);
sheepMoveX.onMotionFinished = function() {
    sheepMoveX.continueTo(1042, 10);
}

But after this I want multiple subsequent movements. This doesn't work:

var sheepMoveX:Tween = new Tween (inst_sheep, "_x", Regular.easeOut, 1142, 1092, 10, false);
sheepMoveX.onMotionFinished = function() {
    sheepMoveX.continueTo(1042, 10)
    .onMotionFinished.continueTo(992, 10)
    .onMotionFinished.continueTo(892, 10)
    .onMotionFinished.continueTo(852, 10);
}

What is the correct format for linking tween events?

Fisu
  • 3,294
  • 9
  • 39
  • 61

1 Answers1

0

Adobe's Tween library is not very well designed. I would avoid it and use TweenLite from Greensock. They have a system where you can queue Tweens so that they play one after another as you describe.

Nathan
  • 87
  • 4