Jump to content

tween complete and remove that tween


sinanqd10
 Share

Recommended Posts

var tween;function create() {            var win = game.add.sprite(game.world.centerX,game.world.centerY,'win');            win.anchor.set(0.5);            tween = game.add.tween(win.scale.set(0));            tween.to({x:1,y:1},800, Phaser.Easing.Elastic.Out,true,1800);}

How can I remove the tween after it tween completed?

I have tried this method,but it seems not working.

tween.onComplete.add(function(){    tween.destroy();});
Link to comment
Share on other sites

Yes sorry for my mistake eguneys. Now I have solved it. However, can I ask you 1 more question about button reset and play the game again.

Here is the link for flash site http://www.happymeal.com.au/en_AU/index.html#/Home .

Click games menu and scroll find the Rock Paper Scissors game. Can you show me the tricks? :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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