Sizmek hosts a number of shared libraries on our CDN that can be used in your ad projects. These are available in both secured and unsecured versions, we recommend that you use the secured versions.
Benefits of using Sizmek shared libraries:
- Reduces size of uploaded ads.
- Assures use of authenticated and current libraries.
- Secure and non-secure versions allow users to prevent mixed content errors when ads are published.
Note: If there is a library that you need and we're not hosting, please let us know by contacting firstname.lastname@example.org.
You can link to libraries specific to the authoring tool you are using to create your ad.
- createjs-2015.11.26.min.js – Animate CC library file: To serve this file from Sizmek’s shared libraries, manually edit the location of this file in the index.html file after creating your published ad directory. Each subsequent publish to the same folder from Animate CC will overwrite this. All you need to do is change this reference to the library:
to Secure sizmek hosted location:
or NonSecure sizmek hosted location:
Alternatively if your publish settings are not set to hosted libraries:
You need to change this relative reference:
and physically remove the 'no longer used' local version of the library from your workspace 'libs/createjs-2015.11.26.min.js'.
Edge uses the following files in its projects that can be linked from Sizmek's shared libraries:
- edge.6.0.0.min.js – Edge’s library file: To serve this file from Sizmek’s shared libraries, manually edit the location of this file in the index.html file after creating your published ad directory. If you update this before publishing in Edge, it will be overwritten with the original URL that came with the template.
Location of the Edge include file in the index.html file (after publishing locally)
Google Web Designer has an option for inlining all script files. This option packs all the scripts right into the index.html file, and we recommend it. However, if you're keen on shrinking the index.html file as much as possible, please let us know which libraries you'd like us to host, and we'll get right on it at email@example.com.
A quick setting you can check that will reduce your workspace's size: when in Hype, go to Preferences and make sure that 'Create restorable document file when exporting' is unchecked. This stops Hype from generating a file for re-creating your ad in Hype, this is not needed when uploading your ad to Sizmek's platform.
To update your ad to link to the Sizmek hosted scripts, first navigate to the resource directory that your project was exported as HTML5 to. This directory contains the file we need to edit: index_hype_generated_script.js. Open this file in your text editor.
This file is minified, make sure you have word wrap on so you can see all of the code.
First, search for or find: c.src=f+"/"
Next, remove the f+ and append the following URL right before the /:
It should look like the following image:
Now you can save the index_hype_generated_script.js file and delete the two HYPE-466 files inside of your workspace's assets directory.
Make sure to test your ad and verify that the files are loading correctly externally. If it looks good, you're ready to zip up your ad and upload it to the platform.
More Shared Library Resources
There are other script libraries which are hosted on Sizmek's CDN that you may find useful. The full list can be found at Glossary of HTML5 Shared Libraries.