Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Tw1ddle/samcodes-ads-demo

Repository files navigation

Haxe Ads Demo

License

Demo of the Chartboost ads haxelib for Android and iOS Haxe OpenFL targets.

Deprecation note. I am not currently using the Chartboost ads haxelib in any games, so this demo is likely to be out of date.

Usage

This demo app uses HaxeFlixel and my ads haxelib, so install these first:

haxelib install flixel
haxelib install samcodes-chartboost # Or use lib/samcodes-chartboost submodule in the repo

Configure the <set> tags at the top of Project.xml for the ads platform:

Chartboost

To use test ads, first ensure "test mode" is enabled on your Chartboost app dashboard.

On Android and iOS, pass the app identifier and signature in when initializing Chartboost:

Chartboost.initChartboost(yourAppId, yourAppSignature);

Set Ad Ids

App, interstitial and banner ids come unconfigured in this demo. You need to set your own:

// In AdLocations.hx
#if chartboostads
// Chartboost locations have custom names - they can be whatever you want e.g.
public static inline var SAMPLE_INTERSTITIAL_LOCATION:String = "my_cb_interstitial";
#end

Once you have done the above, build the app. Press the buttons at the bottom of the "Game Substate" to test the different types of ads. When an ad is visible the app should enter an "Ad Focused Substate".

Screenshots

Chartboost video ad:

Notes

  • Run the JavaScript build here. There's no web ad support yet.

About

💵 Demonstrates Haxe/OpenFL bindings for Chartboost ads haxelib

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages