Question

I am using adobe air native extension to show ad in my game.I am showing ad on main menu having several buttons like Start Game,About.But it take some time to show ad after function showInterstitial has been called. Meanwhile,if user taps on any button screen is changed and game starts.While playing game ad pops up,that's what i don't want. Is there any way to notshowInterstitial if showInterstitial have been called.

I am using this native extension

and what about android,ios developer.How they manage this thing?

Was it helpful?

Solution

I got solution for this.cache the interstitial before the game loads. Once you cache the interstitial before the game loads, use the following method.

/** Checks to see if an interstitial is cached. Location is optional. **/

 public function hasCachedInterstitial(location:String = "default"):Boolean

and if it has cached interstitial then only call showInterstitial.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top