Packagecom.myflashlab.air.extensions.admob
Classpublic class ApiInterstitialAds
InheritanceApiInterstitialAds Inheritance flash.events.EventDispatcher

This class lets you create an interstitial Ad



Public Properties
 PropertyDefined By
  isLoaded : Boolean
[read-only] Indicates if this interstitial Ad is loaded and ready to be shown.
ApiInterstitialAds
Public Methods
 MethodDefined 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
  
loadAd($request:AdRequest):void
Call this method to start loading a new interstitial ad.
ApiInterstitialAds
  
show():void
Will launch the fullscreen interstitial Ad over your app screen.
ApiInterstitialAds
Property Detail
isLoadedproperty
isLoaded:Boolean  [read-only]

Indicates if this interstitial Ad is loaded and ready to be shown.


Implementation
    public function get isLoaded():Boolean
Method Detail
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.