Skip to main content
Participant
November 17, 2025
Answered

HTML5 ad not clicking through

  • November 17, 2025
  • 1 reply
  • 54 views

Hello, we're trying to get an HTML5 ad to work but the vendor placing the ad said our click tags weren't configured correctly. Can anyone help us? This is the code:

 

<!DOCTYPE html>
<!--
NOTES:
1. All tokens are represented by '$' sign in the template.
2. You can write your code only wherever mentioned.
3. All occurrences of existing tokens will be replaced by their appropriate values.
4. Blank lines will be removed automatically.
5. Remove unnecessary comments before creating your template.
-->
<html>
<head>
<meta name="ad.size" content="width=300,height=250">
   <script type="text/javascript">
      var clickTag = "https://www.tacos.com;
    </script>
<meta charset="UTF-8">
<meta name="authoring-tool" content="Adobe_Animate_CC">
<title>Tacos-AI-WS_300x250_v1</title>
<!-- write your code here -->
<script src="Tacos-AI-WS_300x250_v1.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("EBE81129B11549AAADD75204AC9381D8");
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.TacosAIWS_300x250();
stage = new lib.Stage(canvas);
stage.enableMouseOver();
//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(true,'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;">
<div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:300px; height:250px">
<canvas id="canvas" width="300" height="250" style="position: absolute; display: block; background-color:rgba(255, 255, 255, 1.00);">
<a href="javascript&colon;void(window.open(clickTag))">
</a>      
      </canvas>
<div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:300px; height:250px; position: absolute; left: 0px; top: 0px; display: block;">
</div>
</div>
</body>
</html>
    Correct answer defaultld71wzzdk8oo

    nm figured it out. our ahef was in the wrong place. 

    1 reply

    defaultld71wzzdk8ooAuthorCorrect answer
    Participant
    November 17, 2025

    nm figured it out. our ahef was in the wrong place. 

    kglad
    Community Expert
    Community Expert
    November 18, 2025

    thanks for the update