Skip to main content
Inspiring
February 21, 2023
Question

How to make HTML5 game accessible to users

  • February 21, 2023
  • 3 replies
  • 2190 views

Hi. I've tried to recreate a simple AS3 game with the HTML5 canvas, using Javascript. This is the first time I've done this and it's for pupils and staff to use at our school.

It all works fine when I test it from Animate - it opens in a browser and plays. But when I publish it and I get HTML, JS and FLA files, clicking on the HTML file just brings up the visuals, but it isn't interactive in any way. I've tried using the 'Include Javascript in HTML' option, but that didn't make any difference.

Our school has a website, but it doesn't allow for installing game files. Is there a way for people in the school to access and play it locally, maybe from the server - or even from individual PCs' C drives?

The reason I don't want to use AS3 is because the pupils mainly use iPads now.

Thanks.

This topic has been closed for replies.

3 replies

Inspiring
March 1, 2023

Hi. I've sorted it, thanks. I'd set the site up incorrectly on IIS. Thank you all for your help.

kglad
Adobe Expert
March 1, 2023

@pauls73381349 

 

you're welcome.

Colin Holgate
Inspiring
February 21, 2023

The include JavaScript would have helped with some sescurity issues. The other thing you can do is uncheck any spritesheet options, let it create individual images. That would then test locally ok, and you could publish again using spritesheets for the server based version, to help the page load quicker.

I didn't yet figure out a way for my iPad to open local HTML files.

kglad
Adobe Expert
February 21, 2023

they should be able to use the html, js and source folder(s), from any web server, but not locally

Inspiring
February 23, 2023

Thanks for the reply. I've now discovered IIS on our server and I've put the html and js files, plus the images and sounds folders in the root directory. I can now see the game and interact with some of it but not all - and there's no sound. Am I missing something?

kglad
Adobe Expert
February 23, 2023

It says variables are not defined, but it all works fine when tested within Animate.


what are the lines of code just above and below line 1370?

 

what is playPiano?