Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out

PsychoGoldfish's Banner
PsychoGoldfish

Age/Gender: 30, Male
Location: Denver, CO
Job: Web Publisher

Check my site for the latest project updates.

Newgrounds Stats

Sign-Up Date:
9/26/00

Level: 11
Aura: Evil

Rank: Civilian
Blams: 30
Saves: 44
Rank #: 57,677

Whistle Status: Garbage

Exp. Points: 1,270 / 1,350
Exp. Rank #: 20,625
Voting Pow.: 5.33 votes

BBS Posts: 1,054 (0.38 per day)
Flash Reviews: 44
Music Reviews: 2
Trophies: 29
Stickers: 0

Entry #12

Jump to Entry: [ 135 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 ]


PsychoGoldfish

Newgrounds API FAQ

Posted by PsychoGoldfish Apr. 23, 2008 @ 1:30 PM EDT

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.

Updated: 04/23/08 4:39 PM Log in to comment! | Share this!

The People Have Spoken

11 Comments

Apr. 23, 2008 | 3:17 PM TripleDK says:

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?

Apr. 23, 2008 | 3:22 PM PsychoGoldfish responds:

application programming interface.


Apr. 23, 2008 | 7:49 PM PinballWizard976 says:

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

May. 5, 2008 | 10:21 AM PsychoGoldfish responds:

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


Apr. 23, 2008 | 10:34 PM EvilEgg says:

WAit a sec... So I can only make money with games... not just my normal movie?

Apr. 24, 2008 | 10:17 AM PsychoGoldfish responds:

No, movies can certainly make money with this, but it dies take a lot more work and games tend to make more.

From what I have seen, series stuff works pretty well as you often get people watching more than one episode in a sitting, which amps up your overall ad views.


Apr. 26, 2008 | 12:41 AM Matt-Porter says:

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.

Apr. 26, 2008 | 11:04 PM PsychoGoldfish responds:

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


Apr. 26, 2008 | 8:21 AM ShirkDeio says:

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


Apr. 29, 2008 | 5:17 AM koit says:

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.

Apr. 30, 2008 | 5:44 PM PsychoGoldfish responds:

yes and yes


May. 1, 2008 | 9:06 AM fetusdoctor says:

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?

May. 5, 2008 | 10:19 AM PsychoGoldfish responds:

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.


May. 1, 2008 | 6:32 PM Brycearoni says:

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.

May. 5, 2008 | 10:14 AM PsychoGoldfish responds:

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

Updated: May. 5, 2008, 10:15 AM

May. 1, 2008 | 6:57 PM Brycearoni says:

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

May. 5, 2008 | 10:17 AM PsychoGoldfish responds:

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.


May. 5, 2008 | 11:04 PM El-Sammo says:

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?

May. 6, 2008 | 12:17 PM PsychoGoldfish responds:

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


May. 6, 2008 | 11:42 PM Brycearoni says:

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

Jump to Entry: [ 135 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 ]