javascript - getting cocos2d-html5 to work with visual studio -


<rant> swear dealing ide problems worse. want hands dirty code can't. </rant>

as title suggest trying cocos2d-html5 working in visual studio 2012. have coppied cocos2d-html5 files web directory , followed few of tutorials having problem jsloader.js.

prior change below not finding jsloader.js :

   from:  `enginedir: '../cocos2d/',`    to:  `enginedir: '../gridwars/cocos2d/'` 

gridwars name of project

now finds jsloader.js has error.

unhandled exception @ line 117, column 5 in http://localhost:51244/gridwars/cocos2d/platform/jsloader.js  0x800a138f - javascript runtime error: unable property 'loadextension' of undefined or null reference 

for these lines of code:

var d = document; var c = d.ccconfig;  if (c.loadextension != null && c.loadextension == true) { 

which version of cocos2d-html5 did used?

it required configure settings in cocos2d.js file. may find file in template folder.

for example:

var c = {      cocos2d_debug:2, //0 turn debug off, 1 basic debug, , 2 full debug      box2d:false,      chipmunk:false,      showfps:true,      loadextension:false,    //**hey, here loadextension.....**      framerate:60,      tag:'gamecanvas', //the dom element run cocos2d on      enginedir:'../cocos2d/',      //singleenginefile:'',      appfiles:[          'src/resource.js',          'src/myapp.js'//add own files in order here      ]  }; 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -