You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have tried both amazonads and admob but I get nothing.
I have the feeling I'm overlooking something very simple.
Can you tell me what is wrong with this test project please?
(Obviously the banner/interstitial id's should be replaced with the id's from the amazon/admob accounts)
Did I forget to enter the App Id somewhere? Or is it not necessary?
public function new () {
super ();
Ads.enableTestingAds();
//no app id needed?
//Ads.initAmazonAds( "32 character id", Ads.VALIGN_BOTTOM);
Ads.initAndroidAdMob( "banner id","interstitial id", Ads.VALIGN_BOTTOM);
if (stage!=null) init(null);
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):Void
{
stage.addEventListener(MouseEvent.CLICK, OnClick);
}
private function OnClick(e:MouseEvent):Void
{
Ads.showBanner();
}
Hi, I have tried both amazonads and admob but I get nothing.
I have the feeling I'm overlooking something very simple.
Can you tell me what is wrong with this test project please?
(Obviously the banner/interstitial id's should be replaced with the id's from the amazon/admob accounts)
Did I forget to enter the App Id somewhere? Or is it not necessary?
adtest.zip
Basic Main code:
`package;
import extension.multiads.Ads;
import flash.text.TextField;
import openfl.Lib;
import openfl.display.Sprite;
import openfl.events.Event;
import openfl.events.MouseEvent;
class Main extends Sprite {
}`
Basic project.xml:
<?xml version="1.0" encoding="utf-8"?> <project> <!--<set name="amazon"/>--> <set name="admob"/> <meta title="Adtest" package="com.sample.adtest" version="1.0.0" company="Company Name" /> <app main="Main" path="Export" file="Adtest" /> <source path="Source" /> <haxelib name="openfl" /> <haxelib name="extension-multiads" /> <!--<haxelib name="extension-amazonads" />--> <assets path="Assets" rename="assets" /> </project>
The text was updated successfully, but these errors were encountered: