This is an empirical way to activate screencanvas. As C2 doesn't offically supports it, this may lead to unexpected results... Anyway if you want to try, follow these steps.
Export to cocoonjs without minifying your script.
Open in your zip folder the file C2runtime.js
Find the following snippet of code:
window["createCocoonJSRuntime"] = function ()
{
window["c2cocoonjs"] = true;
var Canvas = document.createElement("canvas");
document.body.appendChild(canvas);
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
var rt = new Runtime(Canvas);
window["c2runtime"] = rt;
window.addEventListener("orientationchange", function () {
?window["c2runtime"]["setSize"](window.innerWidth, window.innerHeight);
});
return rt;
};
Delete it and replace with this
window["createCocoonJSRuntime"] = function ()
{
window["c2cocoonjs"] = true;
var screenCanvas = document.createElement("screencanvas");
var rt = new Runtime(screenCanvas);
window["c2runtime"] = rt;
window.addEventListener("orientationchange", function () {
?window["c2runtime"]["setSize"](window.innerWidth, window.innerHeight);
});
return rt;
};
edited><editID>Knifegrinder</editID><editDate>2013-01-04 01:53:51</editDate></edited>