• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Animate HTML banner ad not working in CM360

Community Beginner ,
Dec 06, 2022 Dec 06, 2022

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 

 

 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="ad.size" content="width=160,height=600">
<script type="text/javascript">
var clickTag = "http://www.google.com"; </script>
</head>
<meta name="authoring-tool" content="Adobe_Animate_CC">
<title>Customers_Different_A_160x600</title>
<script src="libs/1.0.0/createjs.min.js"></script>
<script src="Customers_Different_A_160x600.js?1670336850460"></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("51FCF304346543E3AC03FD25FF9AB609");
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_160x600();
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;">
<div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:160px; height:600px">
<canvas id="canvas" width="160" height="600" 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:160px; height:600px; position: absolute; left: 0px; top: 0px; display: block;">
</div>
</div>
</body>
</html




Views

441

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 06, 2022 Dec 06, 2022

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:

<style>
      #animation_container {
        position: absolute;
        margin: auto;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        cursor: pointer;
      }
    </style>
 
and this code inside of  the canvas tag:
onclick="javascript:window.open(window.clickTag)"
        ;
 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 06, 2022 Dec 06, 2022

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--> 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

LATEST

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:

  1. 1. All tokens are represented by '$' sign in the template.
  2. 2. You can write your code only wherever mentioned.
  3. 3. All occurrences of existing tokens will be replaced by their appropriate values.
  4. 4. Blank lines will be removed automatically.
  5. 5. Remove unnecessary comments before creating your template.

-->

<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&colon;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>

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines