Package | com.myflashlab.air.extensions.admob |
Class | public class ApiInterstitialAds |
Inheritance | ApiInterstitialAds flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
isLoaded : Boolean [read-only]
Indicates if this interstitial Ad is loaded and ready to be shown. | ApiInterstitialAds |
Method | Defined By | ||
---|---|---|---|
dispose():void
Call this method to dispose the ad from your app. | ApiInterstitialAds | ||
init($unitId:String):void
Call this method to initialize an interstitial Ad in your app. | ApiInterstitialAds | ||
Call this method to start loading a new interstitial ad. | ApiInterstitialAds | ||
show():void
Will launch the fullscreen interstitial Ad over your app screen. | ApiInterstitialAds |
isLoaded | property |
isLoaded:Boolean
[read-only] Indicates if this interstitial Ad is loaded and ready to be shown.
public function get isLoaded():Boolean
dispose | () | method |
public function dispose():void
Call this method to dispose the ad from your app. If you wish to use it again, you need to call
init()
again.
init | () | method |
public function init($unitId:String):void
Call this method to initialize an interstitial Ad in your app. You can have only one instance of interstitial ad in your page.
AdMob.api.banner.init("ca-app-pub-9222581623235742/6229120311", ApiBannerAds.BANNER);
Parameters
$unitId:String — For every app that you create in your Admob console, https://apps.admob.com/, you can
create several ad units. Each unit will have a unique id which you should pass into your init method so the ANE
can link the ad to your Admob account.
|
loadAd | () | method |
public function loadAd($request:AdRequest):void
Call this method to start loading a new interstitial ad. When the Ad loads, you will be informed with the
AdMobEvents.AD_LOADED
event and that's when you may decide when to actually show the Ad. Maybe at
the end of your game level?
If you want to know the best practices on how to work with interstitial ads, you may find this link very helpful: https://support.google.com/admob/answer/6066980?hl=en
Parameters
$request:AdRequest |
See also
show | () | method |
public function show():void
Will launch the fullscreen interstitial Ad over your app screen. Call this method when you are sure that your Ad is already loaded.