Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Newbie

About psygnus

  • Rank
  1. Eureka! I had to kill the existing tween before creating the new one in order to get a smooth transition. Of course, that required keeping a reference of the object in order to have something to kill! The following code, based on your help and using my object oriented approach gives the best results! function MyObj(params) { this.obj = somedata; //construct canvas object this.tween = null; //declare tween and set to null on object creation //..rest of object constructor... }; MyObj.prototype.startTween = function(y, speed) { //"speed" is pixels per second this.tween = TweenLi
  2. Your code works almost perfectly, but i am getting a small but noticeable jump on the object tween when the function is executed. I am not sure how to address that, but i would like to try this if possible : Can i detect somehow the moment the object reaches the new destination y and stop/pause/kill the tween there? Thanks again for the help, really appreciate it.
  3. Thanks for the feedback. Sorry if i wasn't specific enough, i am actually tweening a canvas object (an easelJS container). I will try your approach, first thing tommorow (currently AFK). While i was waiting for feedback i tried to use updateTo by changing destination and calculating a new duration, but the result was not what i imagined. It worked but it was not smooth enough, like it made the object jump a few pixels abruptly. But it could have been wrong calculations. Is it weird that it kind of worked? Anyway i'm really thankful, will post more feedback tommorow.
  4. Hello, everyone! I would like some help in order to use updateTo function correctly. I create tweens like this : this.tween = TweenMax.fromTo(this.cont2, time/1000, {y:0}, {y:1000, ease:Linear.easeNone, onComplete:on_stop, onCompleteParams:[this.rNum]}); and i would like to be able to stop it during tweening, by setting a new destination y parameter. So i tried to do it like this : this.tween.updateTo({y:500}, false); but this is changing the object's current y position, and not the final y destination. So based on the documentation, i am changing the fromVars Object, instead the toV