Monetizing flash games: MochiAds version control & encryption issues

I am using a DocumentClass and no timeline code in a one-frame game.

Version Encryption did give me some headache as the wrapper didn’t work with my game. In fact, it did load an ad but not the game. After searching several forums I cleared the constructor function except for these lines of code and use the listener to build the game. It works. The document class in this case is named DocumentClass.

public function DocumentClass (){
  MochiBot.track(this, "xxxxxxxx");
  var _mochiads_game_id:String = "xxxxxxxxxxxxxxxx";
  MochiServices.connect("xxxxxxxxxxxxxxxx", this);
  this.addEventListener(Event.ADDED_TO_STAGE, initGame, false, 0, true);
public function initGame(event:Event){
  //start game here;

Somewhere before that point I really did think about distribution without encryption, but as this game ought to be another practice I decided not to give up.

I still wonder if there is any way to get the URL from the loader.

Greet thee, cliffs of Mochiland. Yo ho!

EDIT: Found the way to get the URL while using the wrapper. And here it is.

This entry was posted in game development, mochiads, monetization and tagged , , , , , . Bookmark the permalink.

Comments are closed.