Skip to content Skip to sidebar Skip to footer

0x800a1391 - Javascript Runtime Error: 'stage' Is Undefined

I'm trying to do this tutorial: http://www.sitepoint.com/creating-a-simple-windows-8-game-with-javascript-game-basics-createjseaseljs/

Solution 1:

If you are using a newer version of EaselJS (3.1 is the current version), some things need to change. The most common is that the EaselJS and PreloadJS objects are now wrapped in the createjs namespace. So the line from the tutorial:

stage = new Stage(canvas);

becomes

stage = new createjs.Stage(canvas);

and the line

bgBitmap = new Bitmap(bgImage);

becomes

bgBitmap = new createjs.Bitmap(bgImage);

Solution 2:

I hope that Stage class is defined in your application, that why you getting error on line stage = new Stage(canvas);

please have cross check whether "Stage" class has been defined in any of your JS files(which is included in HTML)

that may be the problem !!!!

Thanks.

Post a Comment for "0x800a1391 - Javascript Runtime Error: 'stage' Is Undefined"