Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by cbg

  1. Thanks @explorerzip, I usually do but it just ended up inline while I was debugging this one, will use it externally in future if it works. Cheers!
  2. Thanks @mikel but that wasn't the problem. I've just been tinkering with it some more this afternoon and found the issue, one of those silly ones! Basically when I remove GSDevTools (the playhead scrubber tool that lets you scrub through the ad) it works absolutely fine. GSDevTools just obviously wasn't playing ball with the new order. Thats a few hours I'll never get back! Thanks for all of your suggestions everyone.
  3. I think it isn't playing automatically on my Codepen because the DoubleClick code is executed on window.load however my GSAP is being executed before perhaps? Does that help anyone as a clue? Thank you.
  4. Hi ohm. That is how I originally had it setup but unfortunately, as mentioned in the original post, when the code is in that order the heights are being calculated differently. For example, compare the distance between the 'dates would go right here' text and the 'book now' button between your version and my version, you can see on your version it is much closer because the animations are being calculated before the content exists. Do you see what I mean? Thanks.
  5. Thanks for taking the time to respond ExplorerZip but that doesn’t really answer my question. I’ve launched many ads via DoubleClick studio with dynamic feeds so I’m aware of how that all works. My issue is more with how I can the Codepen included so that it plays automatically. As mentioned, I have reordered the code so that GSAP now takes into account the sizes of the dynamic elements correctly but the animation no longer starts automatically. thanks.
  6. I just realised a new problem I'm having is very similar to this one. I've tried implementing the DOM ready fix but in this instance the heights still aren't being calculated correctly? https://greensock.com/forums/topic/19539-loading-gsap-after-javascript-dynamically-generated-elements-have-loaded/?tab=comments#comment-90744
  7. I realised I've asked an almost identical question in the past but in this instance the heights still aren't being calculated correctly. https://greensock.com/forums/topic/18976-how-can-i-make-greensock-calculate-the-size-of-an-element-after-javascript-has-loaded/?tab=comments#comment-88118
  8. Hello, I'm trying to create a banner with GSAP and a DoubleClick dynamic feed. Basically dynamic content is pulled into my banner via JavaScript. In order to animate the content I need to wait until the content has been inserted first. This is because I'm animating the heights of DIVs that contain content and if I don't wait until the content has been inserted the heights will be wrong. I've tried various things like document ready and window onload but it doesn't seem to be working. The CodePen I have attached is the closest I've gotten but the issue is, now that I've reordered the code the GSAP animation no longer plays automatically. Could somebody help me please? https://codepen.io/cbg/pen/pqjbmx
  9. Hello, I'm producing an ad template for DoubleClick Studio using polite loading, this is my first time using this. The polite loading appears to work correctly but my GSAP animation plays straight away, how can I have my GSAP animation only begin after it has loaded like the other elements? You'll see on my CodePen that the ball moves before the 'loading' disappears. I know I need to put the animation code within the politeInit function, but when I do this, GSAP breaks completely and it never plays. Thanks JavaScript novice
  10. Thank you! Do you know how I can make the following run, only if the image exists in the DOM? .to ("#image2", 0.5, {opacity:0, delay: 3})
  11. Hello. I'm working on an animated display ad which uses dynamic content pulled in from a feed using JavaScript. I have an unordered list that is populated with content dynamically with JavaScript, the list could contain a variable amount of list items at varying lengths. When I try an animate this list with GreenSock (revealing it by animating the height from 0px) it animates the list based on the content not being there. How can I make GreenSock see the content that gets dynamically generated with JavaScript? Hopefully this makes sense, it's difficult to create a CodePen on this one since it links to external sources etc. Cheers
  12. Hi Sahil, just wanted to say thanks. This really helped me out!
  13. Hi there, can anyone help me please? I have a page with a div that has a fixed position. I'd like to animate the element inside the div with GSAP when you scroll through the sections on the page with ScrollMagic. I am able to make the object move when you enter a section and when you scroll back it is reversed. How can I make it so that the object moves from it's current position to a new position when the user scrolls into the next section? I'd like the element to keep changing position when you enter a different section. I've seen many examples of GSAP and Scrollmagic in action but I'm struggling to find any examples that animate a single element through. A simple Codepen example is attached. Thanks.
  14. Thanks Dipscom. I was able put the script into a variable and then use the onComplete parameter in my timeline to play the variable in the end. Now I've learnt how I'll be able to reuse this method!
  15. Hi there, I'm using TimelineMax and getting some great results. I'm getting quite proficient with using the Timeline to animate various elements on the page. I've found a script called Typed.js that I've been able to run independently of the Timeline perfectly but I'm unsure of how to get it to play within the timeline? I know there are some callback features but my Javascript isn't great! http://www.mattboldt.com/demos/typed-js/
  16. Thanks Shaun, it's good to know that it is possible. I've played around with the Codepen but I'm a little unsure as to how to get it to work with my current setup. I have them absolutely positioned to the points on the canvas I'd like them to finish at. I guess I need to somehow use "to" tweens to make the animation of them moving from outside of the canvas to their current points towards the center? Edit: Also to be clear, I don't want them to go to the center of the canvas, I want them to move slightly towards it which is what would bring them into view on the canvas. Thanks again Shaun!
  17. Simple question with perhaps a complicated answer. Is it possible to animate multiple objects towards a central point in GSAP? Rather than adding positioning tweens to each individual object? For example I have a scene with objects around the canvas, I'd like them to slide onto the canvas towards the middle of the canvas.