Jump to content
Search Community

Found additional GSAP info on DC's Rich Media product forum

somnamblst test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Just answered on Aug. 5, 2015

 

https://productforums.google.com/forum/#!topic/doubleclick-rich-media/cwho__IgmMQ;context-place=forum/doubleclick-rich-media

 

 

Try loading them through JS after page loaded, also load them from the public CDN, most people have already seen banners with GSAP so it will be in their cache, no need to serve it every time.

 
 
My code example...
 
var loadedCount;
 
function pageLoaded() {
    /* Load other assets here */
    
    // Loading 3 scripts
    loadedCount = 3; 
    // Load external scripts
}
 
 
// Load external scripts function for multiple use
loadFile = function(filename, filetype){
  if (filetype=="js"){
      var fileref=document.createElement('script');
      fileref.setAttribute("type","text/javascript");
      fileref.setAttribute("src", filename);
      fileref.onload = function(event) {
        loadedCount--;
        if (loadedCount < 1) {
          creative.showAd();
        }
      };
  }
  document.getElementsByTagName("head")[0].appendChild(fileref);
};
 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...