Skip to content

03. How to Use with Construct 2

floatinghotpot edited this page Sep 29, 2014 · 4 revisions

Read the article by Intel XDK team:

https://software.intel.com/en-us/html5/articles/ads-for-crosswalk-and-construct-2

And, the official release doc from Scirra:

https://www.scirra.com/construct2/releases/r180

How to set license key

If you get a license key, you will keep 100% Ad revenue and Ad under your full control.

After your game development work is done, export the game, find the javascript file named "c2runtime.js".

Find following code snippet and add the license:

} else if (admobPlugin === ADMOB_PLUGIN_COM_GOOGLE_CORDOVA_ADMOB) {
	console.log("Create Ad ADMOB_PLUGIN_COM_GOOGLE_CORDOVA_ADMOB");
	var fullOptions = {
	  'license': 'insert_your_license_key_here',
	  'adId': adUnitId,
	  'isTesting': isTest,
	  'autoShow': isAutoShow,
	  'orientationRenew': isOrientationRenew
	};

And,

} else if (admobPlugin === ADMOB_PLUGIN_COM_GOOGLE_CORDOVA_ADMOB) {
	admobOptions = {
	  'license': 'insert_your_license_key_here',
	  'adId': adUnitId,
	  'adSize': admobBannerSize[adBannerSize],
	  'width': adCustomWidth,
	  'height': adCustomHeight,
	  'position': adPositionType,
	  'x': adPosX,
	  'y': adPosY,
	  'isTesting': isTest,
	  'autoShow': isAutoShow,
	  'orientationRenew': isOrientationRenew,
	  'overlap': isOverlap
	};