Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.
Dominic Roberts edited this page Dec 4, 2017 · 6 revisions

Video

Contents

Interstitials are full-screen visuals that appear inside your application.

1. Register a placement tag

To begin preparations for displaying an interstitial, go back to your initialisation code where you had setup the Tapdaq SDK, and add modify it to look like this:

// create a config
var config:TapdaqConfig = new TapdaqConfig(APPLICATION_ID, CLIENT_KEY);

// Setup the placements with ad types your app will use
var placements:Array = [
	new TapdaqPlacement([TapdaqCreativeType.VIDEO_INTERSTITIAL],PlacementTag.MAIN_MENU)
];

// register placements in config
config.withPlacementTagSupport(placements);

// init Tapdaq ANE
_tapdaq = Tapdaq.init(config);

2. Load the interstitial

Ads must be loaded before they can be shown, call the load method to do so. Provide placement tags to help select which network you want to use.

You can use any of the default placement tags in the PlacementTag or use custom one.

Make sure to add event listeners before loading:

_tapdaq.addEventListener(TapdaqAdEvent.AD_LOADED, onAdEvent);

For the full list of event listeners please see the Events page.

Load the appropriate interstitial:

_tapdaq.loadInterstitial(TapdaqAdType.VIDEO_INTERSTITIAL, PlacementTag.MAIN_MENU);

After TapdaqAdEvent.AD_LOADED event, the interstitial can be displayed.

3. Display the interstitial

After the interstitial is loaded, you can display the interstitial with the same placement tag:

_tapdaq.showInterstitial(TapdaqAdType.VIDEO_INTERSTITIAL, PlacementTag.MAIN_MENU);

In case an interstitial was not ready to display then not available event will be received:

TapdaqAdEvent.NOT_AVAILABLE

Need help?

If you are having any problems integrating, feel free to contact us on support@tapdaq.com and we will be more than happy to help.

What's next?

Now that you have successfully integrated an interstitial into your app, what would you like to do next?

Clone this wiki locally