hi
sorry for my bad english <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">
so i found some one that make admob extension for Ejecta
https://github.com/finscn/Ejecta
and it is work !
and you just need to add this code to index.js
Banner code
initAdMob= function() {
var ad = new Ejecta.AdMobBanner("your admob app id ");
/* Type:
banner,
mediumrectangle,
fullbanner,
leaderboard,
skyscraper,
portrait,
landscape,
invalid
*/
ad.type = "banner";
ad.x = 100;
ad.y = 0;
ad.onload = function() {
console.log("load")
ad.show(); // display ad
// ad.hide()
}
ad.onclose = function() {
console.log("closed")
}
ad.onclick = function() {
console.log("clicked")
}
ad.load();
}
// call the ad after 1 sec of the game finish loading ,
// it will not work if you not wait 1 sec i do not know why
setTimeout(function(){initAdMob()},1000);
[/code:pgdkwq0z]
Fullscreen Code
[code:pgdkwq0z]
// fullscreen ad
var adPage = new Ejecta.AdMobPage("Your AppId of AdMob");
adPage.onload = function() {
console.log("loaded")
adPage.show(); // can't hide it via code
}
adPage.onclose = function() {
console.log("closed")
}
adPage.onclick = function() {
console.log("clicked")
}
adPage.load();
[/code:pgdkwq0z]
if i add this code in the start of the index.js the ad will appear right at the beginning of the game
but i need to control when to show it or hide
so can any one add this to the ejecta plugin like iAd or make plugin for this code
I think that many here will love to use admob with admob 100 % fill rate