admob-openfl 0.0.3

Admob extension for OpenFL

Released 2015-03-05.

To install, run:

haxelib install admob-openfl 0.0.3

See using Haxelib in Haxelib documentation for more information.

Maintainerpozirk
Websitehttp://inside.pozirk.com/
Current version0.0.3
StatisticsInstalled 33 times
LicenseMIT
Tags admob, ads, openfl

README.md

Introduction

Admob OpenFL Extension. (Adnroid only) More info on Admob: https://developers.google.com/mobile-ads-sdk/

Platforms

Android (Anyone willing to extend it to support iOS? Contact me!)

License

Admob OpenFL Extension is free, open-source software under the MIT license.

Usage

import com.pozirk.ads.Admob;
import com.pozirk.ads.AdmobEvent;

...

_admob = new Admob();
_admob.addEventListener(AdmobEvent.INIT_OK, onAdmobInit);
_admob.addEventListener(AdmobEvent.INTERSTITIAL_CACHE_OK, onAdmobCache);
_admob.init(); //you can only use Admob after successful initialization

...

function onAdmobInit(ae:AdmobEvent):Void
{
	_admob.showAd([Ad unit ID], Admob.SIZE_LEADERBOARD, Admob.HALIGN_CENTER, Admob.VALIGN_TOP);
	_admob.cacheInterstitial([Ad unit ID]);
}

...

private function onAdmobCache(ae:AdmobEvent):Void
{
	_admob.showInterstitial();
}