Skip to main content
AmberCHussey
Inspiring
December 2, 2022
Answered

Adobe Animate and CM360

  • December 2, 2022
  • 2 replies
  • 1202 views

Does anyone know how to export a banner ad from Animate for CM360?

Do I need a publishing template? 
Do I need to import any special settings for the clickthrough or action layers?  - Do I even need to do this if I want the whole ad clickable? 

 

Any help would be greatly appreciated. 

    This topic has been closed for replies.
    Correct answer AmberCHussey

    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>

    2 replies

    AmberCHussey
    AmberCHusseyAuthorCorrect answer
    Inspiring
    December 12, 2022

    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>

    Mario_CR
    Community Expert
    Community Expert
    December 2, 2022

    Hi, the html5 Animate outputs needs to be edited to make your ad Google complaint. This channel has several videos explaining how to make a banner ad from start to finish. Here's an example:  https://youtu.be/xUKRZqubSF8

     

    Couple notes:

    • Google's file size limit is 150 kb or less.
    • The whole ad will be clickable by default, no need for clickthrough actions for this.
    • To test if your ad meets Google specs use their html5 validator: https://h5validator.appspot.com/adwords/asset