HTML5 HTML5 and Included Files

Posho

Member
Hello. I've started working on a little project that involves a bunch of included files.

The thing works fine when I run the project as a regular Windows EXE, but the included files are not recognized on the HTML5 version, I tried moving the directory in a bunch of different ways.

Perhaps it has something to do with the way I'm calling them? I do it as:
spr = sprite_add("folder\1.png",0,true,true,0,0);
And like I said, it works on the Windows EXE but not on HTML5.

Any help?
 

Posho

Member
I just read somewhere that HTML5 don't always fully work unless they're hosted on a server. Do you think this has something to do with this? I'm currently running the game from my disk, but haven't tried from a server yet.
 
Last edited:
A

atxgamedesigner

Guest
I've done a few HTML5 apps, and have not had any issues.
Mind you, I'm running them on my own server.
If you place those folders within your source folder that you upload to your server, I would think you would have no problems.

I've had issues testing the HTML5 builds within GMS.
So if you have your build selected as HTML5 and its not working, try testing with your build set to Windows EXE.

Because of these issues, I typically design and test in Windows, and then build as HTML5 after.
 

Posho

Member
I've done a few HTML5 apps, and have not had any issues.
Mind you, I'm running them on my own server.
If you place those folders within your source folder that you upload to your server, I would think you would have no problems.

I've had issues testing the HTML5 builds within GMS.
So if you have your build selected as HTML5 and its not working, try testing with your build set to Windows EXE.

Because of these issues, I typically design and test in Windows, and then build as HTML5 after.
I recently tried putting the HTML5 files on a host under one of my web domains. Still doesn't work.

I even tried getting the sprites/images with http_get("http://domain.com/group/image.png") and http_get_file, and it doesn't work at all. I also tried doing it through the Asynchronous HTTP event and still nothing.

Any help? I'm seriously running out of ideas.
 
W

Wraithious

Guest
sprite_add("folder\1.png",0,true,true,0,0);
Try using sprite replace instead, just make an empty sprite and assign it to your object you want to use to import your included file sprites, I've had issues before with sprite_add for some weird reason, such as other objects getting stuck in them even in the 'empty' parts of the imported sprites, even when remove back is set to 1
 
Top