Codice: Seleziona tutto
var f;
var context;
function f()
{
this.setCanvasInit = function()
{
f = document.getElementById("game");
context = f.getContext("2d");
}
this.setCanvasBackground = function(color) {
document.getElementById("game").style.background = color;
}
};
var f = new f();Codice: Seleziona tutto
f.addEventListener('click', function(){ screen = 1}, false);Codice: Seleziona tutto
function init()
{
f.setCanvasInit(); <-- prima funzione che carica body=onload init();
f.run(1000/20);
}Uncaught TypeError: undefined is not a function
come posso fare?
grazie mille e buona settimana.

