Forum ActionScript 3.0 Mochi breaks PlayerIO

Problems and discussions relating to ActionScript 3.0 here.

Mochi breaks PlayerIO

Postby GBurg » September 17th, 2011, 7:22 pm

Hi all,

I uploaded my game at mochi, and now it seems that PlayerIO.connect is not working anymore. Any ideas?
GBurg
Paid Member
 
Posts: 78
Joined: February 9th, 2011, 10:27 am

Re: Mochi breaks PlayerIO

Postby GBurg » September 18th, 2011, 9:48 am

By remote debugging I found out that the solution is to add this to your document class:

function MyGame() {
var _mochiads_game_id:String = "***";
stop();
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
}

private function addedToStage(e:Event):void {
// now do all your playerio initialization in here
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
}
GBurg
Paid Member
 
Posts: 78
Joined: February 9th, 2011, 10:27 am


Return to ActionScript 3.0



cron