artotal Posted October 9, 2016 Share Posted October 9, 2016 Hi, I'm trying to create a game with Easeljs and jade (preprocesseur HTML), but the exemple in getting started: http://www.createjs.com/getting-started/easeljs with the onload attribute method doesn't work in Jade with the parentheses? body(onload='init()') return init is not define my html: Quote doctype html html(lang='en') head meta(charset='UTF-8') meta(name='viewport', content='width=device-width, initial-scale=1') +style('style.css') title Xavier body canvas#myCanvas(height=200, width=500) | fallback script file Quote function init() { var stage = new createjs.Stage("myCanvas"); var circle = new createjs.Shape(); circle.graphics.beginFill("red").drawCircle(0, 0, 50); circle.x = 100; circle.y = 100; stage.addChild(circle); stage.update(); } init() Quote Link to comment Share on other sites More sharing options...
rgk Posted October 10, 2016 Share Posted October 10, 2016 Have you tried alternatives? http://stackoverflow.com/questions/7561315/alternative-to-body-onload-init Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.