Jump to content


  • Posts

  • Joined

  • Last visited

lateek35's Achievements

  1. Ok sorry guys for this useless topic, I didn't find the way to delete it. In fact, I just figured out that attributes are share between instances of the view in backbone so I need to set them in the initialize. That why object get the same gsap ID. Cheers
  2. Hello guys, I'm experiencing a problem when using TweenMax and Backbone. I currently have a view that set on some tween. The first time I instantiated it, like var firstView = new MyView({...}) my object get transformed like this: _gsTweenID:"t5" x:-20 y:0 and it works just as wanted, but the problem appears when I create the second instance like this: var secondView = new MyView({...}) At this point the second view works perfectly but the first one just not tween anymore, I took a look at the object and figured out that they have the same gsTweenID _gsTweenID:"t5" x:-20 y:0 I really have no idea from where the problem comes, so if you have any clue it would be so nice !
  3. Ok I finally found the problem ! In fact, I didn't gave you the part of code where the problem was. I was creating the timeline in a for loop, and using "i" for select some object etc. Use a closure was the key to solve the scope state problem of "i"
  4. Hello ! I've created a timeline and add this specific tween. Everything work well when I fired myTimeline.play(); The problem is when I fired the reverse() function, open var doesn't decrease and stay at 31. Here the part of the code which doesn't reverse var tweenValues = { open : 1 }; myTimeline.fromTo(tweenValues, 2, { open: 1}, { open: 31, onUpdate:function(){ var srcCeil = Math.ceil(tweenValues.open); target.src = './img/img'+ srcCeil +'.png'; }); If any of you have an idea ? Thanks !