0 Replies Latest reply on Jul 21, 2017 1:30 PM by LeeBow

    New Adobe Animate Export HTML5 No loner works with my site???

    LeeBow Level 1

      Hi guys,

      I'm really hoping someone can help - I've made 100s of canvas animated clipart - which are loaded onto my pages like this:


      <script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
      <script src="canvas/<?php echo $animation; ?>.js"></script>
      var canvas, stage, exportRoot;
      function init() {
       // --- write your JS code here ---
       canvas = document.getElementById("canvas");
       exportRoot = new <?php echo $animation; ?>.<?php echo $animation; ?>();
       stage = new createjs.Stage(canvas);
       createjs.Ticker.setFPS(<?php echo $animation; ?>.properties.fps);
       createjs.Ticker.addEventListener("tick", stage);
        stage.canvas.width = 200;
        stage.canvas.height = 100;    
        var ns = (200/300)*1;
        exportRoot.scaleX = exportRoot.scaleY = 0.35;
        //stage.canvas.width = 200;


      So $animation = 'dog' and it would basically load canvas/dog.js


      and exportRoot = new dog.dog();


      It's been working great  - but I've just made a change to a few og my animations - and the code has completely changed! It's still the same version of createjs - but now the code looks like this:


       canvas = document.getElementById("canvas");
       anim_container = document.getElementById("animation_container");
       dom_overlay_container = document.getElementById("dom_overlay_container");
       var comp=AdobeAn.getComposition("DB4CE1F6C5E22E42A66F63159F4756CF");
       var dog=comp.getLibrary();


      I don't have the composition code - I only have the words to match the animations - like "dog", "cat" etc.



      Can anyone help please!




      My code doesn't work either now - I used to have this line:



      To keep the animations on the first frame. A movieclip called "scene" on the timeline.
      Why do things keep getting changed