PsychoGoldfishPsychoGoldfish

Main News Movies Games Audio Art Favorites Reviews Stats 1,500 Fans
Follow PsychoGoldfish

Newgrounds API FAQ

4/23/08 by PsychoGoldfish
Updated 4/23/08

In response to the many PMs I get asking for help with the new NG API, I have decided it would be nice to have a single place people could go for general help until we have a proper FAQ on the API section itself.

If you have any questions about the API that are not answered below, post a comment and I'll try and get your question included on here.

NG API FAQ Holy acronyms Batman!

--------------------

Q: I just want to run ads, what do I need to do?

A: From the main API Page, add your movie. When the settings page loads, scroll to the 'Flash Ads' panel and make sure they are enabled. Leave all the other options disabled or blank and hit 'save changes'. Follow the installation help for your version of flash.

--------------------

Q: I have the flash ad in my movie but nothing is happening, what do i do?

A: First, make sure you have the NewgroundsAPI.as file in the same folder as your game or movie. Flash 5 and MX users, you need to have the NG_API_OBJECT (not to be confused with the NG_AD_OBJECT) on a layer that spans your entire movie. View the API help page for your movie to obtain the files you need.

--------------------

Q: When I test my movie, the flash ads cover everything up, what's the deal?

A: The ad unit movieclip should only appear on the frame you want the ad to run on. If it covers your whole movie, you probably have it on a layer that spans your full movie. If you are using Flash 5 or Flash MX, chances are you simply confused the NG_AD_OBJECT with the NG_API_OBJECT.

--------------------

Q: I want to use version control... how do I hard code the version number into my movie?

A: You need to set your version number on the same keyframe you have the API installation code. Using the appropriate AS version, replace "1.0.3" with the correct version number.

ActionScript 1 users:
_root.NewgroundsAPI_movieVersion = "1.0.3";

Actionscript 2 & 3 users:
NewgroundsAPI.setMovieVersion( "1.0.3" );

--------------------

Q: How do the ads work? How much money will I make?

A: The ads run on several platforms... CPM, CPC and CPA. What that means is that different ads pay for different things. Some ads pay based on how many views they get, some by how many click-throughs they get and some by how many customers buy something from the advertiser. Because much of the ad inventory is dependent on user interaction there is no way to say for sure how much money you will make. From your stats pages you can guess as to how much you will make by looking at your eCPM rates.

--------------------

Q: What does eCPM mean?

A: eCPM stands for "estimated cost per mille", or in layman's terms, the average amount of money you earn for every 1000 ad impressions.

--------------------

Q: Why is my eCPM so low?

A: The amount of money you earn depends directly on 2 things. The quality of your work and the level of distribution. If your work is of low quality, less people will play it and you will not have much success with ad revenue.

If your work is high quality, but you only have it on one or two sites, you limit the amount of exposure your ads get and will also earn less revenue.

--------------------

Q: Can I use the ads and/or API if I have a sponsor?

A: We have no problem with that, but you should always check with your sponsor first.

--------------------

Q: I want to submit my game to a site that doesn't allow in-game ads, what can I do?

A: When you install the ads in your work, you have the ability to disable them from loading on any site. Lets say you want to submit to www.adfreegames.com but they don't allow in-game ads.

Go to the settings page for your game and scroll down to the 'Flash Ads' Panel, and locate the text bar labeled Add a New Host.

Type "adfreegames.com" in the box and hit the 'add host' button.

Now, if your game is hosted by www.adfreegames.com, the ads will not load. Your ads WILL load on any sites that swipe your swf file from this site!

--------------------

Q: Can I change the tank image and the black border on the ad unit?

A: The ad unit was designed so authors could customize how they look. You can change any of the artwork in the ad movieclips, just avoid altering any of the scripting or instance names. If you break the ad unit you may get limited support, so this is not recommended for novice users of Flash.

--------------------

Q: Why am I getting a "There is no method with the name 'isInstalled'" error?

A: Your copy of NewgroundsAPI.as is out of date. Re-download the API for your version of flash to replace it with the latest version.


Comments

You must be logged in to comment on this post.


how long will it take to get flash ads approved?


B1KMusicB1KMusic

9/10/12

Nevermind, I found out what went wrong. I messed with the component in the library instead of the properties and THAT's what broke it.

I got it working.

Sorry for wasting comment space


B1KMusicB1KMusic

9/10/12

For me, the API is not working at all. It refuses to connect, even on the preview.

On Flash 8:

[Newgrounds API] :: ====== Newgrounds API v3.1.5 AS2 ======
[Newgrounds API] :: Unable to connect to the API.
[Newgrounds API] :: No medal named "First Turn" w.

And on the preview output:
"
Unable to connect to the API.
No medal named "First Turn" w.
"

Help?


when i play a game its says im not logged in to the api and im still logged in to newgroungs


Hi, I'm a novice user at Newgrounds, and it is first time I use the ads. In December it appeared that I had $ 0.05, and now it is January 2012 and says I have $ 0. Another thing, I created another animation with ads, and ads are supposed to have been more than 130 times, and have not won anything according to my statistics.

Please could you help me with my problem, I have no idea what happened to my money.

Thanks in advance.


chelendezchelendez

12/21/11

Hi , I made a game with sprrtes metal slug and mario bros from sprite-resources , i have a problem with that ? if use the api NG?

And other question , I am from Peru , you can send a check to my country? I don´t use paypal.


JeffyxJeffyx

10/10/11

Yo dude, I made my game and all, and I put in all the codes and put in the ad and connecter and preloader and everything, but nothing comes up in the ad box, its just the ng tank. i put the encryption key in and all that, and i uploaded the game to prieview it. am i doin anything wrong?


JeffyxJeffyx

9/9/11

Whenever I try to download it, it opens flash (flash 8 macromedia) and says unexpected file format". It also says that when i try to dowload the preloaders anymore. it never used to. plz help


how about making music? what do yo have to do in order to make money for that?


I insert flash AD ,but it has not advertisement in test.
What to do?


BymzyllBymzyll

11/11/10

Can you also customize and change the look of the NG pre-loader?


Does the NewgroundsAPI_FlashAds.fla get transformed into my movie or do i copy the NewgroundsAPI.connectMovie() and the NG_AD_OBJECT_WITH_PRELOADER into the original file for the movie in the first frame?


Ok im about as new as you can get and I have 2 games up with the newgrounds ad thing on the first frame. Now how can i tell how im doing it shows lik nothings happening or am i looking at the wrong thing. I understand my games arent that great but im gonna get better and before I get extremly serious i wanna know wat im doing and if wat im doing is right. plz comment


RicePirateRicePirate

7/11/10

Thank god you're the first Google result for : "how do i add ads to my newgrounds animations"

The FAQ is sorely missing your precious golden nuggets of info.

Big huge help, thanks!


BwsabBwsab

6/3/10

Can the Newgrounds API be only used for flash movies/games that are submitted to Newgrounds itself, or could I use it to put an ad on a flash movie on a different site?


Is it necessary to have paypal account to take advantage of the Flash Ads?


DrkNrgDrkNrg

5/6/10

Thank you! This was a nice little hop in the right direction! Question: Do you make more pennies in the art portal simply by submitting more art? or is it all lumped together?


sonicGPsonicGP

4/17/10

where is the ad code?? i cant found it is in this page or it comes with the download pack? i mean somehitng llike this NewgroundsAPI.connectMovie(729); please pm me ty very much


When i add the API code on the actionscript panel, i test my movie and i get an error message.

1172: Definition NewgroundsAPI could not be found.import NewgroundsAPI;

1120: Access of undefined property NewgroundsAPI. NewgroundsAPI.linkAPI(this);

1120: Access of undefined property NewgroundsAPI. NewgroundsAPI.connectMovie(11820);

My preloaders also don't work when i enter the code in the action script

A response would be much appreciated. Thanks in advance.


Can this be used in Sprite movies? :(


HolonboyHolonboy

3/11/10

Is www.adfreegames.com a real site?


Mig64Mig64

3/11/10

How can I use it with SWiSHmax?


Hello!
Well, I kind of have a problem. I haven't yet submitted anything to NG because Paypal in my country isn't available and God knows I do Flash for the sake of money. Is it possible that, in the future, API system wil be available in Western Union or any similar?


AL-exeAL-exe

3/5/10

So, wait a sec, where's the API documentation and libraries itself? The API information discoverability on NG is very poor :(


flashkofflashkof

3/5/10

Hi!
I don't understaind, in my report I have :

Ad Impressions eCPM Movie Earnings Your Earnings
198,189 $0.05 $9.34 $0.00

And in my revenue sharing of my account I see : earn 0.03$
Why I have got so little earn !? especially with 9.34$ of movie earning ?
thanks
Jul


Hi! I recently added two of my movies so that I could run ads in them but there doesn't seem to be working like it should! I have the ads in the same folder as my movies but it still doesn't seem to work. I have not earned any revenue even though I get more views what do I do? If you could help that would be much appreciated!

thanks!


I fail! The drop down menu was on this month! and since the month just started nothing was on it!


Suddenly my revenue info isnt showing up! Is that a new years glitch or are you updating the api?


GeneralJGeneralJ

12/26/09

Before I know where I'm giving my information, what Gateway does NG use?


core56123core56123

12/3/09

am... wt if my Paypal is not an american cuz I m not =="

SO what are the concern if I use the non- american paypal to receive the ads payment?

Thanks for ur answer ~


elmagiqueelmagique

10/23/09

I work in pure code (I don't even have flash)
is there a way to still add the API?


KixenKixen

9/20/09

Do i just choose the ad i want, and the company or whatever just accepts automatically? and do i need a paypal that they wire money to? Id like to know how i recieve the money and if i just put the ad there, without consulting anyone


Hey, this is CKAnimations, the creator of PITCHMEN. I'm new to Newgrounds and was just wondering if it's normal that the ad thing on my video just says "Your Ad Code is Working..." and doesn't seem to have an actual advertisement in it.


what about: "how do we delete ngapi profiles"?
because i tested it and made 2 that i will never ever use.


suirad12suirad12

8/8/09

Can i still use ads if i have content in my flash game that isn't originally created by me, like a sprite or a character from another game or show?


ChazzieBoiChazzieBoi

7/24/09

I'm really starting to get on the right track of this Flash API. I opened a blank Flash document and put the ad in with the NewgroundsAPI.connectMovie() code, and it worked just fine. It said in the output box, 'You have successfully connected to the Newgrounds API gateway!' But when I put the ad in a document that has work in it, I put the same code in, and when I test the movie, it doesn't give me that message. How can I fix that so I will get that message and will be able to get revenue? I'll send this to you in a private message too just in case you don't see this.


kenji22kenji22

7/24/09

hmm... ok soooo is this whole revenue thing only for flash movies and games where you have embedded a ad inside the game? or does it work like lets say when i submit a picture (with the adds on the page)-sorry if this has already been asked/answered. couldn't find it anywhere.


My AD's are all working and my API has been actived, but why aren't I making any money(My earnings are $0.00)


I use something called koolmoves. Its really just flash but with less features. Does it work on koolmoves?


pagey94pagey94

7/5/09

How do you actually receive the money made from the ads?


Ive got an animation with ads which i submitted yesterday and when i go to the newgrounds API page to find out my add impressions, eCMP, movie earnings and my earnings it has - - under each heading. can you help?


i added to flash ads but nothing happens when i play it?


My last comment was really stupid because I figures it out right ofter I left the comment. But this time I'm trying to use the as3 ads and not the as2... I've got the correct code put in frame one of my game and I've got the as3 ad and preloader on screen for frame 1 and then I put a blank keyframe on frame 2 so it would go away when you push play. The only problem is that whenever I try and test it, it opens the AS file for as2 and not for as3. I don't know what to do, please help!


This will sound really noobish, but how do I go about putting the API.as file into the same folder as my game? Do I just create a new folder on my desktop and put them both inside it, or what? because that's the only thing that I can think of and it doesn't work.


TyyobrOTyyobrO

4/25/09

In the new Rev Share, do you need some kind of ad or ng loader to make money?


i have Flash MX Pro 2004 and when i go to FILE there is no "Open as library..." option....
how can i put the library in my Flash?


TomJerryTomJerry

4/17/09

Why am i not earning when i get views and i have the flash ads?


ConalConal

4/9/09

Understood.


Hey what happen to the nice bar graph showing your earnings?


nice, this is a great help. and i noticed you live in colorado like me! rock on.