Newgrounds Module

Monkey Programming Forums/User Modules/Newgrounds Module

FelipeA(Posted 2012) [#1]
This is a Newgrounds module which includes some basic functions which are:

[monkeycode]
Connect:Void(appId:String, encKey:String) ' Connects to Newgrounds.
ShowScoreBoard:Void(sbName:String, x:Float, y:Float) ' Shows a Score board.
UnlockMedal:Void(medalName:String) ' Unlocks a medal.
DisableMedalPopup:Void() = ' This Disables the medal popup.
EnableMedalPopup:Void(x:Float, y:Float) ' Enables medal popup. Set position to where you want the medal popup.
PostScore:Void(sbName:String, score:Float) ' Post a score to Newgrounds score board.
HideScoreBoard:Void() ' Hides the score board.
AddFlashAd:Void(x:Float, y:Float) ' You can add a Newgrounds adevertising
HideFlashAd:Void() ' Hides the adevertising.
AdWidth:Float() ' Advert. Width
AdHeight:Float() ' Advert. Height
ScoreWidth:Float() ' Score Board Width.
ScoreHeight:Float() ' Score Board Height.
MedalWidth:Float() ' Medal Popup Width.
MedalHeight:Float() ' Medal Popup Height.
GetUserName:String() ' Get the current username, if it's not logged it returns Guest.
IsMedalUnlocked:Bool(medalName:String) ' Returns TRUE if the medal is unlocked.
IsUser:Bool() ' Returns True if it's a logged user.
[/monkeycode]

Here you can download the module:
https://github.com/ilovepixel/MonkeyNewgrounds

You can try my game that uses this module:
http://www.newgrounds.com/portal/view/600485


Neuro(Posted 2012) [#2]
This is cool, thanks for this! Nice pixel art too :).

Unfortunately, i got this error :



FelipeA(Posted 2012) [#3]
Fixed it :)
I was posting a score of a non logged user.

I've also added a couple of new functions to de module:
format_code('
IsConnected() ' Returns true if the connection exists and false if not.
AdsApporved() ' Returns true if your game was approved by newgrounds to show ads.
')


Neuro(Posted 2012) [#4]
It still occurs if you're not logged into newgrounds. Works fine if logged in.


slenkar(Posted 2012) [#5]
hey I checked out your deviantart
http://manxana.deviantart.com/art/oi-56713231?q=gallery%3Amanxana%2F25740502&qo=23

this fits in with a game im making, how much would you charge for a few pics?


SLotman(Posted 2017) [#6]
Any chances of someone having this? Original link is gone :(

Edit: fount it at https://github.com/devolonter/MonkeyNewgrounds