1 decade ago by Patrick
This week I am trying out AppMobi, my first attempt.
I commented out those sound related, touch events codes and I would see my game scene on the XDK emulators, by clone and modifying the existing 'demo.appgameinterface' sample codes, which comes with 'impact.min.js'.
Then, I thought this 'impact.min.js' might not be the most updated, so I changed the index.js such that it reads
AppMobi.context.include( 'lib/impact/impact.js' );
AppMobi.context.include( 'lib/game/main.js' );
instead of
AppMobi.context.include( 'impact.min.js' );
AppMobi.context.include( 'lib/game/main.js' );
and I also copy the lib/impact folder to the project.
Then I re-run the codes, the console shows the following errors:
Uncaught directCanvas error: canvas.style is not a valid property in directCanvas canvas.html:423
(anonymous function) canvas.html:423
ig.System.SCALE.CRISP system.js:131
window.ig.getImagePixels
ig.Font.ig.Image.extend._loadMetrics font.js:124
ig.Font.ig.Image.extend.onload font.js:20
(anonymous function)
What did I do wrongly?
I commented out those sound related, touch events codes and I would see my game scene on the XDK emulators, by clone and modifying the existing 'demo.appgameinterface' sample codes, which comes with 'impact.min.js'.
Then, I thought this 'impact.min.js' might not be the most updated, so I changed the index.js such that it reads
AppMobi.context.include( 'lib/impact/impact.js' );
AppMobi.context.include( 'lib/game/main.js' );
instead of
AppMobi.context.include( 'impact.min.js' );
AppMobi.context.include( 'lib/game/main.js' );
and I also copy the lib/impact folder to the project.
Then I re-run the codes, the console shows the following errors:
Uncaught directCanvas error: canvas.style is not a valid property in directCanvas canvas.html:423
(anonymous function) canvas.html:423
ig.System.SCALE.CRISP system.js:131
window.ig.getImagePixels
ig.Font.ig.Image.extend._loadMetrics font.js:124
ig.Font.ig.Image.extend.onload font.js:20
(anonymous function)
What did I do wrongly?