Quite a few people have been asking about medals recently so thought I'd just stick my method here to save trying to find it in my overcrowded sentbox every time somebody asks. Originated here (for Ruffle). Presumably you'll want to make an AS2 game anyway since it's most reliable with Ruffle but if not, let me know and I can see what shape my AS3 games are in. Also presumably the more up to date API works now (or maybe not considering the amount of people asking about it) but I never bothered checking since my way works, what's the point. Anyway, here's the method-
"Let me write these steps out as I do them myself because this button always seems to be a pain in the ass to find.
-Create new project (has to be a game).
-Name it otherwise Newgrounds will shit itself.
-Click API tools at the bottom.
-Click "I agree, show me your tool" at the bottom.
-Click advanced on the next screen to show more text.
-Click "click here" on the line highlighted below.
-Copy the following from the top of the screen.
Your API ID
Encryption Key
-A link to medal section will be at the bottom but should be clear how to get to it from your project page (it's easy to use so no worries there).
Next, download this- https://www.newgrounds.com/dump/item/6e44c08f9ac6c486f988ca7b764b14f0
-Open it.
-Click the API Connector object that's on the screen.
-Under properties, you'll notice spaces to copy in your API ID and Encryption Key.
-Copy in your API ID and Encryption Key.
-Copy and paste the connector object onto the first frame of your project (will appear wherever you put it. can drag it off frame if preferred)
-Then use this code to unlock medals.
import com.newgrounds.*;
API.unlockMedal("MEDAL NAME GOES HERE");
You'd think you wouldn't need the first line every time but last I checked, you do.
Here's also a way to reposition the popup (that's very helpfully not mentioned anywhere).
import com.newgrounds.*;
API.unlockMedal("MEDAL NAME GOES HERE", 69, 420);
//Puts it at position 69, 420. Change the numbers to change the position.
Looks like I also left the scoreboard object in there. Here's the code to submit a score.
com.newgrounds.API.postScore("SCOREBOARD NAME", Score);
//SCOREBOARD NAME is whatever you named the scoreboard here on Newgrounds in the game settings. Score is a variable you create yourself in the game (can name it whatever you like). Whatever value it has will be displayed on the scoreboard.
Ignore the flash ad object, they don't even get approved anymore.
Any problems, let me know. Old ass system so probably inevitable but this is the most reliable way I've got them to work anyway."