Mochi Integration

Jon

  • *
  • Posts: 17524
The preference is under Advanced Settings in the Game Center as described in the blog post. If it's anywhere else, it's an out of date build.

The blocks are under the Game category under Flash APIs. If they're not showing up, download a fresh copy of the preview.

zerosimms

  • Posts: 710
Thanks Jon, I've no idea what happened, I downloaded it three times. Then tried at work and BOOM there it is!

This is a great feature, thank you so much!

Darkhog

  • Posts: 1243
Will it work when running game from projector/internal FP?

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

JensWinterstein

  • *
  • Posts: 432
Will it work when running game from projector/internal FP?
You may wish to add the location of your development files to your global security settings in the Adobe Flash Player Settings Manager. This way, you can give all SWF files in this location local-trusted access, allowing access to both local and remote data.

i.e. add the following: "yourPathTo\StencylWorks\preview\Game.swf"
(it's the location of your .swf file after hitting "Test Game" in Stencyl)

« Last Edit: October 21, 2011, 08:01:50 am by JensWinterstein »
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon

  • *
  • Posts: 17524
Yeah, what Jens says has to be done to test locally.

Darkhog

  • Posts: 1243
Sad - it means I'll be unable to distribute game as standalone projector-powered app.

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Jon

  • *
  • Posts: 17524
Is this all working well for those who've tried this in the normal use case (not Darkhog's?)? We're releasing 1.2 within 48 hours and want confirmation outside our internal team.

JensWinterstein

  • *
  • Posts: 432
Works fine so far for Loony Box. I uploaded the version with mochi integration to the stencyl arcade to showcase the ads. I can't speak for mochiscore though.
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

cruzader

  • Posts: 40
Hi guys!

Is there a way to trigger a scenechange after the mochiad has finished? I think there's a mochiad function called "adfinished". Is it possible to use it in a codeblock? Something like:

if adfinished == true
{
switch to gamemenu
}

@Jens: How did you do it for Loony Box? Would you share some details of your pregame-ad implementation?
BlueFlashGames

JensWinterstein

  • *
  • Posts: 432
@Jens: How did you do it for Loony Box? Would you share some details of your pregame-ad implementation?

Sure! After the preloader, the game switches into a blank scene with the following behavior (put  under "when created" block):

Code: [Select]
Code: MochiAd.showInterLevelAd( {clip:FlxG._game, id:GameState.mochiID, res:"640x480", ad_started:function():void{Mouse.show();}, ad_finished:function():void{switchScene(2, createFadeOut(((1000*0.25))), createFadeIn(((1000*0.25)))); Mouse.hide(); }});
You can find the "Code"-block under Flow -> Advanced.
The fadeout time is not needed here though, since the transition isn't applied over the ad container.
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

cruzader

  • Posts: 40
Hey Jens!

Thanks a lot for your quick help. Without it, the new MochiBlock would have been useless for me... ;)

Now it works like a charm and I've loading my game up to Mochi right now... :)

best wishes
Michael

PS: ...{switchScene(2, createFadeOut(...  This was another scene for me of course. It's quite annoying to find out what the internal name for a scene is... the best way for now is to add a scene-transition-block and then look into the code... ;)
BlueFlashGames

JensWinterstein

  • *
  • Posts: 432
PS: ...{switchScene(2, createFadeOut(...  This was another scene for me of course. It's quite annoying to find out what the internal name for a scene is... the best way for now is to add a scene-transition-block and then look into the code... ;)

Sry Mike, I forgot to mention that. Great that you figured it out yourself :)
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon

  • *
  • Posts: 17524
We can alter the block in the future to have a clause for "after finished". That's not hard to do.

Something like

show ad [] and then do...
{
}

Jon

  • *
  • Posts: 17524
I've just published a much more detailed article that covers every aspect of our Mochi integration. Mochi themselves will be promoting this article on their site in the near future.

http://blog.stencyl.com/?p=379