Jump to content
Search Community

Sander

Members
  • Posts

    9
  • Joined

  • Last visited

Sander's Achievements

0

Reputation

  1. Thanks for your answer! I was thinking about that too, but since there was a ignoreBeforeTime parameter I thought there might be a ignoreAfterTime (or something) method/parameter that I wasn't aware of. I've implemented your code and everything works as it should. Thanks!
  2. Hi! Maybe I'm just overlooking something, but what I want is to get all the tweens in a timeline BEFORE a certain time and ignore all the tweens that come after that time. I saw in the documentation that the method "getChildren" with the parameter "ignoreBeforeTime" set returns all the children after a certain time, but I actually want the opposite. How can I achieve this? Thanks!
  3. No problem! Things like that will only help me understand the GSAP structure better. The more you learn. Thanks!
  4. Beautiful! Works like a charm. Thanks! I had to change one thing though: tween.timeline was null, so I used tween._timeline. Works, but all variables and function starting with _ should be considered private functions, right? Why is tween.timeline null?
  5. Aha, very clear explaination, thanks! So basically, easy explained, the onComplete events are "saved up" when navigating away from the page and THEY are fired at once when navigating back. I must say that I have tried setting useRAF to false, but that didn't seem to solve anything. I will try it again though. Because I really don't want to be dependent of TweenMax or TimelineLite, I will try to take care of it by writing some code myself. I will get back here when I make some progress or when I have another question. Thanks a lot!
  6. Hi. I'm writing a particle tweening script that tweens a bunch of dom elements, which I each give a slightly more delay. Everything looks fine, but when I switch tabs in my browser (chrome, but same in safari) and after that go back to the tab with my particle tweens, the delay seems to be ignored.. All the tweens start at the same time, without the delay! Any idea why this is? If you don't understand what I mean, I could upload the script to my hosting as an example. Oh, and I thought about using timelinelite for this, but I really want the sort of plugin I'm writing to not be dependent of timelinelite, only of tweenlite. Edit: I've uploaded the test project to my webhost so you can see the problem yourself. http://sanderbruggem...cles/index.html Open the page in a tab, then click on another tab, wait a few seconds and go back to the tab with my test project: the particles "explode" now instead of continuously loop.. I think I know why: the first time the tween is played, the delay is taken into account, but then when I call "restart()" on the tween in onComplete, the delay is not added anymore. Which in general is good: the tween already has an offset regarding the other tweens because of the initial delay. However, probably for speed reasons, when navigating away from the page, all the tweens are being reset/paused or whatever, and on focus again all the tweens are played again (but this time without the initial delay, because it practically fires "restart()" but this time on all the tweens at the same time). So my question actually is: what type of event is used to determine if the window/tab is focussed, so I can intercept this (i've had partial success with window.onfocus() and window.onblur()) OR is there maybe another solution for this?
  7. Oh, sorry, I was planning on downloading the whole Greensock JavaScript Library again to check if the code at that point was maybe changed since I last updated the library, to check if it was maybe a bug that was already fixed, but I totally forgot! Now I have, and I see, at line 564 of TweenMax.js, the code has changed: there is no longer a reference to this.timeline. I suspect that will solve all my problems. Sorry for the unnecessary post and a big thanks for creating the whole library, you've really, really helped me out with my graduation project.
  8. Hi. I'm creating a project that uses TweenLite to tween easel properties. Everything goes right all the time, except for when I try to user TimelineMax.insert() to insert a tween (that doesn't tween any properties, but that I add to keep a reference to the object and to add the onUpdate-events the whole time the object should be on the easel Stage) at a certain point in my code. At all the other points in my code where I use insert() to insert a tween at a certain position, everything goes right, but not at one point. I keep getting the error Uncaught TypeError: Cannot read property '_time' of null at line 564 of TimelineMax.js.. At this line this.timeline == null. I've logged the other times I use insert() and this.timeline is never null. Also, I logged the object and it's properties, and they are also all not null or undefined. I'm pretty stuck, do you have any idea? Thanks! (For reference, the insert code i use:) this.timelineMax.insert( TweenLite.to( object.easel, object.duration, { } ), object.start );
  9. Ok, it's not finished, so don't mind the things that don't work properly yet, but I used tweenlite for a schoolproject, and you can view it here: http://sanderbruggeman.com/Q5/ PS. the language is dutch Oh, and I'm using tweenlite (and now and then tweenmax) for quite some time now, but I just now discovered the tips & tricks page. I've used that on the tweens in my example above now (local) and the scaleX and scaleY tweens are so much smoother now. Thank you!
×
×
  • Create New...