Html5 Newgrounds publishing

Hi guys!

Anyone knows if I can integrate this Newgrounds API on my code:

"Create a new Newgrounds Game Project
Download NG.min.js, the minified Javascript library.
Put this at the end of your index.html page:

In your main Javascript file, call NG.connect like this:
NG.connect(YOUR_API_ID,YOUR_ENCRYPTION_KEY);
Shake your cursor like it's dancing, coz you're done! :D"

You can find this instruction at this link:

newgrounds.com/projects/games/646548/preview

Where I have to put this file (NG.min.js)?
And what is my main Javascript file (it's gse-export.js?)?

Thank you guys!

Federico

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    There is a javascript code inside the index file.

  • traceur93traceur93 Member Posts: 44

    @Lost_Oasis_Games said:
    There is a javascript code inside the index file.

    It's ok, and this is the first question.
    What about my second quest?
    I think that "main Javascript file" it's not the html.index. True?
    What is it in your opinion?

    Thank you for your reply!

    Federico

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2015

    Javascript is an html5 executable language. If you open index in a text program you will see code bracketed by this < script. > there will be two that look like that one at the top of the script and one at the end. All the code inbetween those two are javascript. There are three different options for an index file you can use. See my html 5 video

  • traceur93traceur93 Member Posts: 44

    @Lost_Oasis_Games said:
    Javascript is an html5 executable language. If you open index in a text program you will see code bracketed by this < script. > there will be two that look like that one at the top of the script and one at the end. All the code inbetween those two are javascript. There are three different options for an index file you can use. See my html 5 video

    So, in your opinion this "main javascript file" that Newgrounds quote it's the html.index file?

    Federico

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2015

    As ardent showed there are a few commands you can use. I imagine this requires more that adding the code they show. You would need to intergrate it with either a scene change or show banner. I don't think anyone has done that yet. Not sure which file you'd need to modify or how to rewrite the script. Looks like for now you're on your own in this area. Sorry.

Sign In or Register to comment.