Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] html5 load from a source

Author
Message
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 9th Dec 2018 06:34 Edited at: 19th Dec 2018 08:20
This post has been marked by the post author as the answer.
Instead of directly loading from the same folder, I wish to load all js, mem from a url instead.



The url this content will be loaded from has been mod-rewrited and the server has no way to load it directly like it is in the same folder as the url.
Namely something like "http://127.0.0.1/game/GAMEID/".

The problem is how it complain about "Cannot load bytecode file because it was compiled with an old compiler" even though it load fine directly in the same folder with "./AGKPlayer.html.mem" in the javascript.
Unity3d has the ability to define the actual location of the .data file as well.
Is it giving this error because it could not load the .data file?
viewing source and clicking on the javascript line do indeed load all 3 file so the url provided is correct!

Any help appreciated!

UPDATE: any developer?
The main reason is similar to other site hosting games from site like newground...
Error code is: Error: Not Found : http://127.0.0.1/games/xxx/AGKPlayer.data

I guess if a developer give the option to assign the data file...

UPDATE: NVM
I fix it by changing the following in AGKPlayer.js
var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);
to
var xhr=new XMLHttpRequest;xhr.open("GET",websiteURL+packageName,true);

in http template
var websiteURL = <?php echo 'http://website.com/'; ?>

The author of this post has marked a post as an answer.

Go to answer

Login to post a reply

Server time is: 2024-03-28 22:22:38
Your offset time is: 2024-03-28 22:22:38