-
Notifications
You must be signed in to change notification settings - Fork 0
Video
Interstitials are full-screen visuals that appear inside your application.
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);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.
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_AVAILABLEIf you are having any problems integrating, feel free to contact us on support@tapdaq.com and we will be more than happy to help.
Now that you have successfully integrated an interstitial into your app, what would you like to do next?