Jump to content

Yoyo multi timeline tweens / chained tweens


updatestage
 Share

Recommended Posts

Hi there,

 

I have a problem with the yoyo function. I want to create a tween with more than one movment and yoyo this. I tried following ways:

var sp = this.add.sprite(100,100,"btn");var tween = this.add.tween(sp);tween  .to({x:200}, 500)  .to({y:200}, 500);tween.yoyo(true).start();

and

var sp = this.add.sprite(100,100,"btn");var tween = this.add.tween(sp).to({x:200});var tween2 = this.add.tween(sp).to({y:200});tween.chain(tween2);tween.yoyo(true).start();

But it doesn't "yoyo" the complete animation. How can I do this?

 

Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...