[HTML5] SWF loading timeout

Hello.

I get a little problem using SWF lib.
Usually .swf file (converted into .zip for HTML5) is big, containing all the resources, like 5mb+.
While testing on slow connection it doesn’t load completely and always cut at 30 seconds, thus game just stalls.
First, I was thinking it’s my server settings, but I don’t have this problem with other big files loaded outside of SWF library.

Does anyone know anything about 30 seconds timeout for SWF library?
Any way to change that?
Thanks.

1 Like

Indeed I once also had to deal with this problem. The assets file was pretty big, the connection to the server too slow so it timed out after 30 seconds.
The culprit is in HTTPRequest.hx
timeout = #if lime_default_timeout Std.parseInt(Compiler.getDefine("lime-default-timeout")) #else 30000 #end;

You can set the timeout manually inside project.xml e.g. 2 minutes like:
<haxedef name="lime-default-timeout=120000" />

2 Likes

Yay, thanks a lot!
That looks easier than I was thinking. :slight_smile: