Copy link to clipboard
Copied
I created an HTML ad using Animate.
I edited my HTML file and added the META tag and click tag.
I uploaded a Display Ad to CM360 and it will not click out or get the click icon when hovering over it.
I know it has to do with something in the code but can not figure out what.. I have over 50 ads I need to do.
Can someone please look at the code and let me know what it is I'm doing wrong or if there is a publishing template I can use for google?
The zipped file I uploaded to CM360 is below.
https://www.dropbox.com/t/9jfKiPrxoSHfL1yH
Here is the HTML
Copy link to clipboard
Copied
I'm no expert but this is what I have to add to make mine work. I didn't look over all your code, so maybe something eles is causing your issue. Try this. Add a style for your pointer icon:
Copy link to clipboard
Copied
... It also appears you have two closing head tags, try deleting the first one just below your script tag up near the top and just leave the </head> tag seen just below <!-- write your code here-->
Copy link to clipboard
Copied
Spoke to CM360 customer support.
I highlighted the code in red that you have to add to the stuff animate spits out below in case someone else has the same problem
<!DOCTYPE html>
<!--
NOTES:
-->
<html>
<head>
<meta charset="UTF-8">
<meta name="authoring-tool" content="Adobe_Animate_CC">
<title>Customers_Different_A_300x50</title>
<!-- write your code here -->
<meta name="ad.size" content="width=300,height=50">
<script type="text/javascript">
var clickTag = "http://www.google.com";
</script>
<script src="libs/1.0.0/createjs.min.js"></script>
<script src="Customers_Different_A_300x50.js"></script>
<script>
var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;
function init() {
canvas = document.getElementById("canvas");
anim_container = document.getElementById("animation_container");
dom_overlay_container = document.getElementById("dom_overlay_container");
var comp=AdobeAn.getComposition("68BF38DAA26A4FBA95BBC12EB9E542C0");
var lib=comp.getLibrary();
var loader = new createjs.LoadQueue(false);
loader.addEventListener("fileload", function(evt){handleFileLoad(evt,comp)});
loader.addEventListener("complete", function(evt){handleComplete(evt,comp)});
var lib=comp.getLibrary();
loader.loadManifest(lib.properties.manifest);
}
function handleFileLoad(evt, comp) {
var images=comp.getImages();
if (evt && (evt.item.type == "image")) { images[evt.item.id] = evt.result; }
}
function handleComplete(evt,comp) {
//This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage.
var lib=comp.getLibrary();
var ss=comp.getSpriteSheet();
var queue = evt.target;
var ssMetadata = lib.ssMetadata;
for(i=0; i<ssMetadata.length; i++) {
ss[ssMetadata[i].name] = new createjs.SpriteSheet( {"images": [queue.getResult(ssMetadata[i].name)], "frames": ssMetadata[i].frames} )
}
exportRoot = new lib.Customers_Different_A_300x50();
stage = new lib.Stage(canvas);
//Registers the "tick" event listener.
fnStartAnimation = function() {
stage.addChild(exportRoot);
createjs.Ticker.framerate = lib.properties.fps;
createjs.Ticker.addEventListener("tick", stage);
}
//Code to support hidpi screens and responsive scaling.
AdobeAn.makeResponsive(false,'both',false,1,[canvas,anim_container,dom_overlay_container]);
AdobeAn.compositionLoaded(lib.properties.id);
fnStartAnimation();
}
</script>
<!-- write your code here -->
</head>
<body onload="init();" style="margin:0px;">
<a href="javascript:window.open(window.clickTag)">
<div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:300px; height:50px">
<canvas id="canvas" width="300" height="50" style="position: absolute; display: block; background-color:rgba(255, 255, 255, 1.00);"></canvas>
<div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:300px; height:50px; position: absolute; left: 0px; top: 0px; display: block;">
</div>
</div>
</a>
</body>
</html>