HI, I´ve got a 15mb app and it takes a while to load (after it loads, everything runs just fine) but problem is that loading screen stays on for 3s and then, blank screen. Fact is that the loading goes on and on and it seems the app is broken (but it is not).
Can you PLEASE help me with this?
Im using a loading screen (everything runs just fine) but it only starts after this blank screen pause.
I´ve found this piece of code but I don´t know if it is helpful as I cannot write plain code.
Runtime.prototype.go_loading_finished = function ()
{
if (this.overlay_canvas)
{
this.canvas.parentNode.removeChild(this.overlay_canvas);
this.overlay_ctx = null;
this.overlay_canvas = null;
}
this.start_time = Date.now();
this.last_fps_time = cr.performance_now(); // for counting framerate
var i, len, t;
if (this.uses_loader_layout)
{
for (i = 0, len = this.types_by_index.length; i < len; i++)
{
t = this.types_by_index;
if (!t.is_family && !t.isOnLoaderLayout && t.plugin.is_world)
{
t.onCreate();
cr.seal(t);
}
}
}
else
this.isloading = false;
for (i = 0, len = this.layouts_by_index.length; i < len; i++)
{
this.layouts_by_index.createGlobalNonWorlds();
}
if (this.fullscreen_mode >= 2)
{
var orig_aspect = this.original_width / this.original_height;
var cur_aspect = this.width / this.height;
if ((this.fullscreen_mode !== 2 && cur_aspect > orig_aspect) || (this.fullscreen_mode === 2 && cur_aspect < orig_aspect))
this.aspect_scale = this.height / this.original_height;
else
this.aspect_scale = this.width / this.original_width;
}
if (this.first_layout)
this.layouts[this.first_layout].startRunning();
else
this.layouts_by_index[0].startRunning();
;
if (!this.uses_loader_layout)
{
this.loadingprogress = 1;
this.trigger(cr.system_object.prototype.cnds.OnLoadFinished, null);
}
if (navigator["splashscreen"] && navigator["splashscreen"]["hide"])
navigator["splashscreen"]["hide"]();
for (i = 0, len = this.types_by_index.length; i < len; i++)
{
t = this.types_by_index;
if (t.onAppBegin)
t.onAppBegin();
}
this.tick(false);
if (this.isDirectCanvas)
AppMobi["webview"]["execute"]("onGameReady();");
};
var raf = window["requestAnimationFrame"] ||
window["mozRequestAnimationFrame"] ||
window["webkitRequestAnimationFrame"] ||
window["msRequestAnimationFrame"] ||
window["oRequestAnimationFrame"];