Jump to content


  • Posts

  • Joined

  • Last visited

Frank's Achievements



  1. Ah, now I understand the 'onCompleteParams' property, they contain the parameters of the 'onComplete' function. I should have read the docs more carefully, since it's all there. Yes, it's working now as intended. Thanks Ico and Carl for your help.
  2. Ico, I did this initially, but it didn't work, so I created a timeline and added a 'onComplete' there (code above) but it's still not working. Maybe it's an issue with Edge Animate not treating 'onComplete' properly?
  3. Hum, one question about 'onComplete': It seems my Timeline isn't waiting for the timeline to complete before it calls the function. Any clue how to delay the start of the 'glow(YearGlow)' function until 'Year' is fully visible? var Curtain = sym.$("Curtain"); var Mask = sym.$("Mask"); var YearGlow = sym.$("Story1Year_GLOW"); var Year = sym.$("Story1Year"); var tl = new TimelineLite({delay:1, onComplete:glow(YearGlow)}); tl.to(Curtain, 4, {autoAlpha:0}) .to(Year, 2, {autoAlpha:1}); flicker(Mask); function flicker(object) { TweenMax.to(object, 2, { opacity: Math.random() * 0.5, onComplete: flicker, onCompleteParams: [object] }); } function glow(object) { TweenMax.to(object, Math.random() * 0.1, { opacity: Math.random(), onComplete: glow, onCompleteParams: [object] }); } Thanks!
  4. Guys, thanks so much for the quick replies. I'll test this out later tonight and get back. Thanks again.
  5. Hello, I'm new to GSAP and in fact pretty new with JS, so please bear with me. I'd like to use GSAP together with Edge Animate. I'd like to produce a flickering type of animation and started out using this: TweenMax.to(object, Math.random() * 0.5 + 0.5, {opacity: Math.random(), repeat:-1}); The length of the tween should be random (between 0.5 and 1 second) as well as the opacity target. The code repeats the exact tween again instead of using a new random property for each new iteration. How can I get this to work with new random numbers with every iteration? Also, if I use for example rotation instead opacity, how can I make every iteration start at the previous end position rather than the initial one? Couldn't figure out how to use invalidate() in case this is the key. Can these two things be achieved without adding standard JS loops? Thanks in advance for your help. Frank