Jump to content


  • Posts

  • Joined

  • Last visited


2 Newbie
  1. HI guys I'm having similar problems... I'm using Webpack and if I do: import ScrollToPlugin from 'gsap/src/uncompressed/plugins/ScrollToPlugin' It finds the ScrollToPlugin ok but its then looking for TweenLite and is unable to find the file
  2. Is it possible to play between two points on a timeline? I'm aware I can use seek to go to a specific point but what I'd like to do is stop as certain point. ie. something like: timeline.playBetween(0.3, 0.9) So my animation would start at 0.3 and end at 0.9 along the duration of the timeline. Is this possible?
  3. Hi guys Thanks for your replies.. To be honest while not understanding the exact details of why its along the lines of what i figured was happening. I'd already solved the it by doing as you said and not putting the callback right at the end of the timeline. I posted really just to document it in case anyone else had a similar problem. But interesting read and to be honest I am constantly impressed at how reliable GSAP is.
  4. Hi just spent a good few hours trying to work this out and not sure if its a bug or not but thought I would share on here. I'm using a various timeline tweens with .call() at the beginning and end of each timeline to show and hide an asset. These are used in conjunction with various other tweens in the timeline. i.e on a 6 second timeline.. .call(showHide, [], this, 0) .call(showHide, [], this, 6); These timelines are then chained together in one master timeline. What I noticed is that while moving forward through the timeline everything worked OK but going backwards the .call() that was at the end of the each individual timeline wouldn't fire. I solved this by just triggering the call 0.1 of a second before the end of a timeline. i.e again on a 6 second timeline.. .call(showHide, [], this, 0) .call(sshowHide, [], this, 5.9);
  5. Well there you go.. Thanks Mr Jefferson I'll give that a bash!!
  6. ok almost brilliant.. So my function is a within an object and if I make a call to this function outside of the timeline it works fine i.e.: this.tl = new TimelineMax({onUpdate:updateUI}); this.tl.add(showAnim1, 1.5) function showAnim1(){ parent.anim1.animateWidth(0,300); } but when I try and tidy it up and call it directly within the timeline as shown below: .call(parent.anim1.animateWidth, [0,300], this, 1.5) I get a "Uncaught Cannot tween a null target." Any idea why this would be?
  7. Hi.. Can someone tell me if its possible to pass a var to a function you call from a timeline? I've been using timelines to call functions.. i.e. this.tl.add(myFunction, 2) but I want to pass a var so I thought the following: this.tl.add.(myFunction("myvar"), 2) But this doenst work.. any suggestions? Thanks
  8. Its ok.. I faked a click by calling startDrag after a screen resize this seems to sort everything out. So all good.
  9. its a little complicated to produce a demo but essetially what happens after a resize is that the animation is all out of sync which kind of expect. I have no way of resetting the progress. If however you drag on the container a function is called on update and does the following ************************ var X = -this.x; if (X <0 ){ X = 0 } animation.tl.progress(X/data.w3); ************************* I thought I could trigger this function after resize but it only works if you physically drag on the container.
  10. Once you have declared a draggable object is there away to delete it again? The reason I ask is that I have page that works really well controlling multiple tweens as you drag the container. The problem comes if the browser is resized and I get all sorts of odd results. if you hit refresh then it works fine. So my thinking is the easiest way to get around this would be to redelclare everything after a resize. I've done this for the timeline animations but i can't seem to find a way to get rid of the "draggable" once it has been set. There is a "disable" but what I would like to do is completely remove it.
  11. ah ok that sounds good. The on progress wasn't that reliable. Giving that a go now. Thank you.
  12. ok forget that.... but this on the update... if(data.tl.progress() > 0.2){ mytriggerfunction(); } sorted