CPMStar (Flash)

GameDev408

  • Posts: 257
I tested the game many, many times. No ads were shown.

GameDev408

  • Posts: 257
Well, I might as well stick to the lower performing FGL Ads in which you made an extension for (thank you for that).

Jon

  • *
  • Posts: 17524
This contains some references to nme that will need to be updated to openfl for this extension to function in 3.3 and above. Please update. Thanks!


FMStudioGameDev

  • *
  • Posts: 233
Hi there,
I am trying to display an interstitial CpmStar ad in my Flash game.
I succeeded in displaying the banner but I got this error when removing it

Code: [Select]
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at MyCPMStar$/removeAd()[C:\Users\Setroyr\AppData\Roaming\Stencyl\stencylworks\engine-extensions/cpmstar/MyCPMStar.hx:89]
at MethodInfo-8540()[Source/scripts/ActorEvents_304.hx:90]
at com.stencyl.models::Actor/innerUpdate()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/models/Actor.hx:1496]
at com.stencyl::Engine/update()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2479]
at com.stencyl::Engine/postUpdate()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2618]
at com.stencyl::Engine/onUpdate()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2611]

is this something that can be fixed?

Another weird thing is that I was able to show ads only using the code found here http://community.stencyl.com/index.php/topic,14071.msg86147.html#msg86147
But if I try with my sponsor code no ad is displaying. Also tried for testing purposes the code provided by pinhard here http://community.stencyl.com/index.php/index.php?topic=22617.msg130625#msg130625 but still no ad is showing.
Any ideas?
Thanks a lot.

rob1221

  • *
  • Posts: 9473
I have no idea why that error is showing up now since I'm already checking if the stage contains the ad before removing it.
Code: [Select]
if (stage.contains(ad))
{
stage.removeChild(ad);
ad = null;
}

FMStudioGameDev

  • *
  • Posts: 233
I have no idea why that error is showing up now since I'm already checking if the stage contains the ad before removing it.
Code: [Select]
if (stage.contains(ad))
{
stage.removeChild(ad);
ad = null;
}
Yeah, I noticed it too. And now? There's nothing we can do about it?

rob1221

  • *
  • Posts: 9473
I don't know.  I'm busy prepping for a game release and one of my other extensions needs to be fixed so I don't have time to look into this right now.

letmethink

  • *
  • Posts: 2545
The .contains function returns true for grandchildren as well as just children. Perhaps that is the issue here. (with blacklist, from what I can see the ad is being added to mc before mc is added to the stage)
~Letmethink

FMStudioGameDev

  • *
  • Posts: 233
The .contains function returns true for grandchildren as well as just children. Perhaps that is the issue here. (with blacklist, from what I can see the ad is being added to mc before mc is added to the stage)

Hey Letmethink you are great, you know?
After reading your post I made an ignorant attempt and tried replacing
Code: [Select]
stage.removeChild(ad);with
Code: [Select]
stage.removeChild(mc);and, surprisingly, it works!
Thanks a lot!


ChristianEs

  • Posts: 230
i dont understand how cpm star works, i have an account but then it says this:

"Partner Application
In order to approve you as a partner on the CPMStar network we need to know where you will be displaying our ads.
Please enter the URL of each Web Site or location of your game(s), mobile or Facebook App you plan to run ads.
NOTE: Please add full and valid URLs: ex) "http://www.userSite.com," "http://apps.facebook.com/userApp," "https://play.google.com/store/apps/userdetails"


does this means that if for example i want to ad my games on tons of flash sites i need to add every site there?
and is the original site like: "www.flash-game.net" or they want the exact link to my already submitted game there
 for example: http://www.flash-game.net/game/xxx/xxxxxxxxx.html ?

they denied my appeal for it before saying that they  don't offer sponsorship anymore or something like that , but i think is because i put wrong the info.

rob1221

  • *
  • Posts: 9473
Maybe they're not accepting new partners?  The only time I used CPMstar was with a sponsor years ago.

ChristianEs

  • Posts: 230
so, even if i find a working  sponsor code on the web i wouldn't be able to do anything true? because i need to be "accepted" by cpmstar on their site.

rob1221

  • *
  • Posts: 9473
So you tried signing up as a developer (not publisher) and you were denied?