2 Replies Latest reply: Apr 20, 2013 4:19 PM by grandascreativos RSS

    Position x, y canvas - toolkit createjs

    grandascreativos

      Hello,

       

      As I can position in x & y. my animation on the canvas, for example 200px right or 100px top.

       

      Thanks

       

       

      This is my code:

       

      <!DOCTYPE html>

      <html>

      <head>

      <meta charset="UTF-8">

      <title>CreateJS export from cloud gc</title>

       

      <script src="easeljs-0.6.0.min.js"></script>

      <script src="tweenjs-0.4.0.min.js"></script>

      <script src="movieclip-0.6.0.min.js"></script>

      <script src="cloud gc.js"></script>

       

      <script>

      var canvas, stage, exportRoot;

       

      function init() {

                canvas = document.getElementById("canvas");

                exportRoot = new lib.cloudgc();

       

       

       

                stage = new createjs.Stage(canvas);

                stage.addChild(exportRoot);

                stage.update();

       

                createjs.Ticker.setFPS(10);

                createjs.Ticker.addEventListener("tick", stage);

      }

      </script>

       

       

      </head>

       

      <body onload="init();" style="background-color:#D4D4D4">

                <canvas id="canvas" width="616" height="475" style="background-color:#ffffff"></canvas>

      </body> 

      </html>