Skip to main content
Inspiring
May 13, 2021
Answered

Offline project

  • May 13, 2021
  • 2 replies
  • 1059 views

I created a canvas project specifically to use offline. I have unchecked the hosted library option, but the project does not appear to be using the js code. Here is the console error. 

 

And here is where the code is referenced in the HTML file. 

I tried disabling all the browser security setting to no avail. Then tried Firefox with these console errors:

Seems it is all about accessing the js correctly, but I don't know how to make this happen. Again, this project needs to run from the files I will publish and not online. What can I do to make that work?

 

This topic has been closed for replies.
Correct answer JoãoCésar17023019

If you plan to send the files to other users then it's going to be hard for them to play your game because they would need to setup a server themselves.

 

But if it's for you only, then you can install something like XAMPP or download Visual Studio Code and install the Live Server extension.

 

Anyway, the output of the HTML5 Canvas document is essentially a website. And websites are meant to be used online.

 

Have you tried Netlify? You just need to drag and drop a folder containing the files of your project to their website and in a matter of seconds your game will be online.

 

Please see this answer for more details about Netlify.

2 replies

Legend
May 14, 2021

If you're making a game exclusively to be played offline, you may as well just develop it in ActionScript and publish it as a projector EXE.

Inspiring
May 14, 2021

Yeah, now I know, but I don't think I want to do all the code rewriting necessary at this point. Thanks.

JoãoCésar17023019
Community Expert
Community Expert
May 13, 2021

Hi.

 

Even for offline usage most HTML documents need a local server.

 

Please see this answer.

 

Regards,

JC

Inspiring
May 13, 2021

Well I don't know how to solve the problem then. I see this plugin for Flash. Is there a similar "projector" for Animate? Or would this work? https://exchange.adobe.com/creativecloud.details.1641.html

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
May 13, 2021

If you plan to send the files to other users then it's going to be hard for them to play your game because they would need to setup a server themselves.

 

But if it's for you only, then you can install something like XAMPP or download Visual Studio Code and install the Live Server extension.

 

Anyway, the output of the HTML5 Canvas document is essentially a website. And websites are meant to be used online.

 

Have you tried Netlify? You just need to drag and drop a folder containing the files of your project to their website and in a matter of seconds your game will be online.

 

Please see this answer for more details about Netlify.