00:00
00:00
PsychoGoldfish
I like turtles

Age 47

NG Code Monkey

Hard Knocks

Ur Mom

Joined on 9/26/00

Level:
14
Exp Points:
2,006 / 2,180
Exp Rank:
31,533
Vote Power:
5.60 votes
Audio Scouts
2
Art Scouts
3
Rank:
Town Watch
Global Rank:
47,811
Blams:
48
Saves:
131
B/P Bonus:
2%
Whistle:
Normal
Trophies:
57
Medals:
774
Supporter:
11m 30d

Newgrounds API FAQ

Posted by PsychoGoldfish - April 23rd, 2008


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

I thought I was the only one to first notice your staff position now... Well... Your pic needs more "Fish" in it... lol
But yeah, I guess this FAQ is nice, and I might wanna try this thing when I finally complete my stuff...

Just one question: What the **** does API stand for?

application programming interface.

I need flash for this right? Damn liveswif.... :(

Yes, you do need Flash. However, we have support for every version of flash from 5 up.

Congrats on being staff :)
As for the API, I'm very interested to try this out. My only concern is if CMG or Max games will be interested in having adds in their sponsored games. I know you guys allow it to happen, but I'm unsure of the opinions on the sponsors. Well, I have a game in the act of getting sponsored right now so I'll be sure to ask sponsors what they think and let you know, that way you can have a "real life stories" section for examples on how successful it was with sponsors hehe. Anyway, great job on this and I really respect the work put into it, peace.

You should check out flashgamelicense.com they can help you get the deals YOU want without settling on status quo

How do you see how many referrals you've had (i.e. how many times your game has called NewgroundsAPI.getNewgrounds).

Hello

Can you use this API on existing NG submitted stuff. I have a fairly large back catelogue of animations/games and would like to add it to them.

So :

1) Can it be done on old stuff
2) if yes, is it a case of just re-submitting the flash file with the API code embedded ?

Thanks in advance.

yes and yes

So do most of the sponsors only want ads in "family-friendly" movies and games? Or is nudity and explicit audio/text still allowed to make money?

Most ads come from an ad agaency who run ads for a wide variety of advertisers. Because many of these advertisers do not want their products associated with adult themes, we do not approve movies with extremely expicit language and sexual content for Flash Ads.

How do I check how much money I have made?
How do I get paid, do I have to enter a credit card number or my location?
How do I earn the money; do I have to do anything else besides putting the ad in my animation/game and putting the code

NewgroundsAPI.connectMovie(729);

Please help me; if you could I would like to get a PM from you regarding this. And thanks for the tutorial it's very helpful.

You will see your earnings on the http://www.newgrounds.com/account /flashapi page.

Around 40 days after your first month of earnings you will receive a check (or paypal payment if you are a non US resident).

The game earns money as people view and click on the ads. See my post on distributing your work for help with maximizing this aspect:
http://psychogoldfish.newgrounds.
com/news/post/113031

Also what do I do w/ the Actionscript that goes in the same folder as my game/animation? (You know the AS file that I downloaded that comes with the Flash Ad)

Please PM me about this TY SO MUCH <3

The .as file you download is a class file. When you add NewgroundsAPI.connectMovie(XX);, Flash automatically looks for the file names NewgroundsAPI.as in the same folder as your FLA file.

This file contains all the code used to talk to the API gateway and handes the events that make your ads load up.

Is there anything special I have to do revolving around scenes in my movie? Do I just make an additional layer in all of my scenes for the ad?

if you use scenes, you only need to add it to the scene where the ad will be viewed

Thanks for answering my comments up top I have one more question though, where do I put my home information so i can receive my check in the mail? Like is that after I submit it and there will be a webpage that pops up saying "Insert Info"?
Thanks

I am actually working on that stuff right now... it should be all good to go before the next payment period. It will automatically prompt you to fill in that information when it's ready.

I've read somewhere about what content are not allowed in using Flash Ads,
but now I can't find them...

I know that Adult-rated content are prohibited,
but is Mild nudity allowed?
its somewhat in the mature content rather than adult-only

I am planning to run ads on the game I'm making - Chobits Dating Sim

if it would fit within a pg-13 rating it's probably okay, but a lot of advertisers are squeamish about nudity of any kind... what with the human body being vile and evil and all ;)

oh and additional question,
if I am a non-US resident, (I'm in the Philippines)
but I don't have a paypal account,
can I also receive it through check?

Yes you can, but you might want to check with your bank and see what kind of check cashing fees there are for US currency. It may actually save you a lot of money to go the paypal route... paypal accounts are free and even without a bank account attached they can issue you checks in your native currency.

Please get back on this!!!!

how old do ya have to be to put this on your flashs i really need to know as my mum wont let me and i have to perswade her

This varies from country to country, but basically if you are old enough to legally get a job, you are old enough to use this.

Alright, I was wrong I do have another question.

Can I make a Flash that has API if I do a collab?

Sure can, we're even working on getting multi-author revenue splits build in to this sucker!

I implent the API in a movie, but the only thing that shows is the NG tank. I did ActionScript 2 on Flash CS3 and used the AS2 method in the API. This should be possible, right?

Yeah the as2 version will work in CS3 if you are working in AS2 mode. If you haven't activated your movie you should see a placeholder ad with Pico when you test. If you activated your movie and you see nothing, it's possible your movie didn't pass our approval guidelines. It could still be waiting for approval as well.

Wow the questions just keep on coming from me! (Thanks for you answers before) I'm thinking of making a guitar hero parody, will that be acceptable? (Since Guitar Hero is trademarked and so is the plastic guitar [Gibson]) Thnks rock on

Parody is protected under US copyright law so it's all good.

If I take sound files from flashkit.com (they are not copyrighted, or at least I don't think so) can you use them in your video that contains API if you give them credit at the end.

same thing for sprites at sprites-resource.com?

Yes you can. These sites provide sound and art for you to use in your work and you won't get sued by any record companies or anything for using them.

My movie has 2,171 views and 935 Ad Impressions , but for eCPM and Estimated Earnings it still says -- , -- .

Does it take a certani amount of time to update or do you need more ad impressions to even get those ?

at 935 ad impressions you probably havn't made any money yet. To really get your movie making money you need to get more traffic to it and you need to expose it to other audiences.

Newgrounds is a great community for having your work exposed and reviewed, but our users are pretty familiar with all the sites promoted in the flash ads, wich means you won't see the best performance by just submitting here.

Other sites have a wider audience of casual web users who are a lot more likely to click yoru ads and make you money.

Its okay to use Ads on movies that have copyrighted music on it, or does your work have to be 100% yours?

Our obligations are to the advertisers and to the flash authors of NG. As long as the content of your work doesn't reflect badly on advertisers (by inclusing porn, racism, etc alongside their ads) and you didn't decompile a game or movie that was made by another hard-working author you should be okay.

That said, we STRONGLY encourage people to not use copyrighted songs in their work. Many flash authors have had legal threats from doing so and it can land you in a lot of trouble if your start finding success. The Audio portal has a TON of great music that you can use legally.

More Results