emulator icon indicating copy to clipboard operation
emulator copied to clipboard

Can I embed the emulator without jQuery?

Open perelowski opened this issue 8 years ago • 7 comments

Hello,

I'd like to know if there is a way to make the emulator work within the simple HTML, like:

nesbox.txt

I tried the above code but the game did not work. What syntax should I use for URL to the game?

perelowski avatar Oct 09 '16 22:10 perelowski

don't know, maybe try to urlencode rom url, like %2Froms%2FFlappy%20Bird%20(PD)%20v1.0.gen

nesbox avatar Oct 10 '16 08:10 nesbox

Thanks for info, it really works without jQuery. I have another question, though - how to make the emulator fit the 100% width and height to the enclosing div? For example, in GBA mode the emulator window has default size of 480x320 pixels. I'd like to put that in the div and make it fit that div using <OBJECT style="width: 100%; height: 100%;">

perelowski avatar Oct 10 '16 16:10 perelowski

I'm not good in html, sorry.

nesbox avatar Oct 10 '16 16:10 nesbox

Hi, thanks for info. In other words - are there any parameters, flashvars etc. that can be sent to the emulator to set it to desired width / height?

perelowski avatar Oct 10 '16 20:10 perelowski

there are no such parameters, the emulator calls 'resizeOwnEmulator(width, height)' on your JS where you should resize the emulator object

nesbox avatar Oct 10 '16 20:10 nesbox

Thanks for info, it's clear. A bit off-topic: where can I find info on embedding the JavaScript version of Nesbox? I'd like to try that but there seems to be no docs on its site.

perelowski avatar Oct 11 '16 07:10 perelowski

JS is just a demo and I'm going to remove it.

nesbox avatar Oct 12 '16 18:10 nesbox