OMG Finally!
I got it to work finally, i think i was calling the ads functions on the wrong time, so the services weren’t connected yet, so i made an “IF” condition on UPDATE function to make sure that it was connected, once it was connected it adds the AD, for further support here is the code:
override public function update():void {
if (MochiServices.connected == true && ad_show == false) {
//MochiAd.loadShowcase( { clip:root,
//id:_mochiads_game_id,
//position:"0x0", // This represents an X, Y offset from the center.
//ad_count:5, // The number of ads to display in the showcase.
//ad_size:90, // Force dimensions for all Ads displayed.
//user_close:true, // Allow the use to close the Showcase ad.
//ad_loaded: function(w:int, h:int):void { }, // A callback that occurs when ad is first displayed.
//ad_closed: function():void { }
//} );
MochiAd.loadDock({
clip:root,
id:_mochiads_game_id,
position:"bottom_center", // See below for explanation.
ad_count:5, // The number of ads to display in the showcase.
ad_size:50, // Force dimensions for all Ads displayed.
ad_loaded: function(w:int, h:int):void { }, // A callback that occurs when ad is first displayed.
ad_opened: function():void {}, // A callback that occurs when the user opens the Dock by mousing over the tab.
ad_closed: function():void {} // A callback that occurs when the Dock auto-hides.
});
ad_show = true;
}
super.update();
}
Thank you for the help!
---- EDIT —
Saddly it won’t work on Android, incompatible with Adobe AIR