Jump to content

How to reset a tween?


neonwarge04
 Share

Recommended Posts

Is there a way to reset a tween?  I have a tween which animates the object to move upward from the bottom-most of the screen. Now if I selected the object, it will collapse back to where it came from. I am able to animate the object to show to the screen but I can't animate it back.

I sneaked into the source but couldn't found a way. Any ideas? This is frustrating, it feels like I am coding in assembly. 

Thanks!

Link to comment
Share on other sites

Strange thing is, 

 

  this.mLogoMove = new TweenWrapper({x : this.mLogo.x , y : this.mLogo.y})    .to({y : 330} , 200)    .onUpdate((function(updatedVariables)      {        this.mLogo.y = 500 - updatedVariables.y;      }).bind(this))    .onComplete((function()      {        this.mStartButtonMove.start();      })    .bind(this))    .start();  this.mLogoMove.start();

 

the line this.mLogoMove.start() is undefined. Setting up breakpoints on instanciation still also undefine. That is crazy. Imagine I already instanciated an object and the var is still undefine, but you can still see the object fires up normally. Though I believe this is pure JS thing.

 

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...