kit-kat-toe: mochiads with haxe

I recently tried out Viktor Hesselbom Haxe Instructions for MochiAds and they work just fine.

Something like this…

% wget
% unzip
% cd MochiAPI_v3_8
% mkdir -p foo/mochi
% cp -r mochi/as3 foo/mochi
% cd foo
% compc -source-path . -output mochi.swc -include-sources .
% unzip mochi.swc library.swf
% haxe –gen-hx-classes library.swf

Then just get the game id from the nice folks over at mochi and jam in the little bit of ad code.

One problem I had was that I found I needed to add a new MovieClip to the flash.Lib.current, use that for the ad and remove it in the ad_finished callback.

I had some mixed luck with swfmill… The old version I had (0.2.12) didn’t complain about the mp3 I having the wrong bitrate… But when I linked against the -swf-lib from the new version it produced a blank swf!

So… I have no sound…

LOL… it is a very silly proof of concept… check it out

I call it kit-tac-toe

gory swfmill detail

To compile swfmill under Hardy Heron (I know… it’s old)… I had to modify swfmill.c and add: extern char *xslt_simple;

And it still didn’t work… I may try to use a newer box to see if my horked environment is why it didn’t work right….

Here is the handy message I got from it…

Sampling rate: 32000
Error: Flash only supports sampling rates of 44100, 22050 and 11025 Hz
WARNING: MP3 file sounds/cats/meow.mp3 has a wrong sampling rate

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: