javascript - EaselJS not getting linked -
i started learn javascript through online tutorial , downloaded files github repository.the files of type "easeljs-0.7.1.min".when typed out code given below not show on browser. problem of files downloaded or of linking statement ?
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>working</title> <script src="lib/easeljs-0.7.1.min.js"></script> <script> var canvas; var stage; var img; var text; var logo; function init() { canvas=document.getelementbyid("mcanvas"); stage=new stage(canvas); text=new text("whaaaaaaaaa","36px arial","#666"); text.x=100; text.y=100; stage.addchild(text); stage.update(); } </script> <body onload="init();"> <canvas id="mcanvas" width="960" height="500"></canvas> </body>
all classes in easeljs contained in "createjs" namespace, thus, use stage or text classes, trying do, must call createjs first:
stage = new createjs.stage(canvas); text = new createjs.text("whaaaaaaaaa","36px arial","#666"); result: http://jsfiddle.net/bav8h/
Comments
Post a Comment