bitmap - My addEventListener does not work on Easeljs -


i have started easeljs , want call function when click on bitmap. have done withous success:

we told me cross-domain image issue don't know is... code:

<!doctype html>  <html>      <head>          <title>test</title>           <script src="easeljs-0.8.0\lib\easeljs-0.8.0.combined.js"></script>          <script>                var moncanvas;              var scene;              var monimage;              var monbitmap;                          function init()              {                    moncanvas = document.getelementbyid("mon_canvas");                  scene=new createjs.stage(moncanvas);                      monimage=new image();                  monimage.src="smiley.png";                  monimage.onload=creationbitmap;                    createjs.ticker.useraf=true;                  createjs.ticker.setfps(40);                  createjs.ticker.addeventlistener("tick", tick);              }                function creationbitmap()              {              monbitmap=new createjs.bitmap(monimage);              monbitmap.x=200;              monbitmap.y=70;              monbitmap.regx=20;              monbitmap.regy=20;              monbitmap.addeventlistener("click", clicksouris)              scene.addchild(monbitmap);              scene.update();              }                 function clicksouris()              {              alert("some text");              }                            window.onload=init;             </script>    </head>      <body>          <canvas id="mon_canvas" width="1000px" height="600px" style="border : 1px solid"></canvas>      </body>  </html>


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -