FGL Ads (Discontinued by FGL)

rob1221

  • *
  • Posts: 9456
UPDATE: FGL is no longer supporting these ads, so the extension is now obsolete.
https://www.fgl.com/blog/2015/11/fgl-will-no-longer-support-flash-in-game-ads/

I made an extension to support the new ads provided by FGL.  There are two blocks to use.  The "Start FGL API With Ad Code ___" block uses the ad code that FGL (or FGD, the distribution site) gives you to prepare the ads.  The "Show FGL Ad" block then shows the ad.  Despite the API needing a small amount of time to load, I coded the extension so you can call both blocks at the same time if you want.  It is also safe to compile to any other platform with these blocks (they just won't do anything).

"fglads 3-3.zip" is for Stencyl 3.3, and "fglads.zip" is for earlier versions.

« Last Edit: November 21, 2015, 04:05:53 pm by rob1221 »

spoogob

  • Posts: 1106
Ok testing this in my rollinPaint2 game, seem to have set it up correctly. (Ive set it up to show an ad when the game starts, then click a continue button once its finished/closed). Im assuming ive set the ad code correctly ? (i downloaded the ad-code, opened the .as file and took out the 'fgl-xx' code and inserted into the 'Start fgl api with ad code ..' block? I get ads coming up i think (those little repeating centre of the screen ads?).


Turbo Assassin

  • Posts: 37
Hi,

Sorry for being ultra-thick but I really don't understand how to implement theses ads at all  :'(

I've downloaded an AS3 adcode file from FGL, and I've been trying to import the extension provided in this thread but I'm really not confident enough to start fiddling about with code.

Would it be possible to explain this step-by-step so that future idiots like me can be referred to this thread to guide them safely through what seems like volatile landmine of hieroglyphic code  :-\

I'm so close to publishing my first game and got so hyped that I subscribed to Stencyl 3.0, only to be booted in the groin one final time by hooves of Satan himself  :'(
"I imagine one of the reasons people cling to their hates so stubbornly is because they sense, once hate is gone, they will be forced to deal with pain."

spoogob

  • Posts: 1106
You need to copy the extension folder into your stencyl > plaf > haxe > extensions folder. Restart stencyl, then inside your game you need to enable the extension in the settings page > extensions. Then it will ask you to reload your game etc. Once its reloaded, youll find under your events panel inside a scene, under 'custom' , there is 2 blocks. Use these as rob says up above.

Turbo Assassin

  • Posts: 37
thanks for replying, spoogob!

My directory only goes Stencyl>plaf and then I've got a "flash" and an "ios" folder. I placed Rob's  "fglads" in the "flash" folder and restarted Stencyl.

No luck! The setting haven't been updated.

I wonder if Stencyl hasn't been installed properly and that is why I'm lacking the "haxe" and "extention" folders?

I'm getting really scared now, something terrible is happening! Is there anything else I could try?

-Turbo.
"I imagine one of the reasons people cling to their hates so stubbornly is because they sense, once hate is gone, they will be forced to deal with pain."

spoogob

  • Posts: 1106
yeah it has to go into the extension folder.. for me its:

programfiles(x86)/stencyl/plaf/haxe/extensions, then paste the folder into there.

restart stencyl, open game, goto settings and extension, enable fglads.

but yeah, it has to go in the extension folder as above :)

rob1221

  • *
  • Posts: 9456
Turbo Assassin, that's the 2.2 folder you're looking in.  Just run Stencyl 3.0 and go to Settings > Extensions > Install Extension.

Turbo Assassin

  • Posts: 37
Man, I'm really sorry about this, but I don't seem to have an "Extension" tab under my settings (I'm also missing the "Atlases" tab).

Maybe a re-install would iron out the kinks?

 :'(

"I imagine one of the reasons people cling to their hates so stubbornly is because they sense, once hate is gone, they will be forced to deal with pain."

rob1221

  • *
  • Posts: 9456
You're not using Stencyl 3.0.  This extension is only for 3.0 which you can get here if you don't already have it: http://community.stencyl.com/index.php/topic,13789.0.html

If you want the 2.2 version, see the link in my first post.

Turbo Assassin

  • Posts: 37
Ha! I thought I was using 3.0 because the splash screen had disappeared!  :P

I feel both stupid but also very relieved. I'll download 3.0 now!

Thanks for your help rob!
"I imagine one of the reasons people cling to their hates so stubbornly is because they sense, once hate is gone, they will be forced to deal with pain."

rob1221

  • *
  • Posts: 9456
I updated the extension with event listeners which are optional but allow for more control of the ads.

Recently I found out that the FGL team created the ads to be used with their distribution service FGD (flashgamedistribution.com).  You must use FGL ads when distributing games on FGD and cannot use any competing ads (Mochi, CPMStar, etc).  FGL users can read more about that decision in this thread.

Jorj

  • Posts: 78
hi there

just a quick question: I must insert FGL-xxxxxx or just only xxxxxx in the start block ?


rob1221

  • *
  • Posts: 9456
I updated the extension with whatever changes FGL made in the past few months.  One major fix is that the failure events can now catch users with Adblock so you can either push those users to the next scene or block them, your choice  8)

MrWagoner

  • Posts: 424
Just posting to say thank you rob! I wanted to add my game on http://flashgamedistribution.com/ which uses the same API. I checked the available Stencyl Extensions with little hope, but there it was already. ;)

Integration worked straight out of the box, good job!

I have discovered http://www.mindjolt.com/ and I like the concept that they mirror their games & their API into a facebook app, which means it could bring a game in front of a lot of potential  players. Their API seems very similar to the FGL ad api, I think I might be able to create an extension for this by using your extension as example. Let's see how this goes....

EDIT: It goes nowhere as apparently it has been done already: http://community.stencyl.com/index.php/topic,32923.0.html

Check out my newest game: Blowy Fish!