Haxe WWX Conference, what’s next

I was there with my Silex Labs crew who organized it. We had a great time and it was a very positive vibe. Our story on it is here.

Haxe right now is at a crossroad. It’s mature enough as a technology to go mainstream, and I think the market is ready for it.  Client platforms are very uncertain at the moment. Haxe is not cross-platform. However it is platform independent, meaning that it’s not bound to ios, android, html, etc. , so moving from one platform to another is much less painful than for example an xcode/objective-c/ios project. This makes it very interesting for software shops around the world.

However it needs to attract some big companies to help get it polished enough to not scare people away. Things are moving in the right direction, but the documentation, tooling, communication are sorely lacking. If it had to come under one umbrella term, I think the “developer experience” is not nearly as good as it could be.

I don’t myself sell much Haxe projects, though as a co-founder of Silex Labs I take an interest in it and do some open source work with it. I would like to do more. Right now I’m working on a big PHP project for an international organization, but change is good!

Sommeria Search plugin for amfPHP allows to search Twitter

I’ve created a simple plugin for amfPHP that allows your app to search Twitter easily via amfPHP. The idea is to add more search engines later as needed, and to show this as an example of how easy it is to create plugins that add value to the amfPHP ecosystem.

It is branded ‘Sommeria’ rather than ‘amfPHP’ as it does not enhance core functionality as the other plugins distributed with amfPHP do.

download below:

SommeriaSearch

Looping Audio in Flash, part 2

this is a follow up post to this one.

I’ve continued building on http://blog.andre-michelle.com/2010/playback-mp3-loop-gapless/ . And I’ve come up with some improvements:

  • make the loop a separate class
  • allow switching from one loop to another seamlessly.
  • fix a bug that what harmless in a browser but that broke the app on an iphone. In certain cases the previous “extract” method would read beyond the buffer causing the looping to stop.

See below for the code.

Continue reading →

Packaging AIR Native Extensions is Horrible, but this Might Help

I’ve just spent the day learning about AIR Native Extensions. The idea is to build an Iphone app with a Flash Builder interface but using native Iphone audio capabilities. It seems that globally things have been well thought out and executed, but there’s one thing that comes across as amazingly pre-alpha craptastic: packaging your native extension. It also happens to be the worst documented, and apparently the worst understood by Adobe’s own team as their articles on the subject are misguided and confused.

The basic bricks you need for an ios only native extension are :

  • an XCode project where you code your native functionality
  • a Flash Builder Library project where you write the AS code that serves as a bridge

And then you would expect that you could point the Library project to your compiled native library, and it would produce a ANE file, ready to use. Right? Right? No.

Continue reading →

amfPHP 2.0.1 is out!

Phew, that was hard! The goods here: http://www.silexlabs.org/131386/the-blog/blog-amfphp/amfphp-version-2-0-1-reloaded-is-out/

Looping Audio in Flash

You’d think looping audio in Flash would be trivial, right? think again. There’s enough info on the net to tell you what you need, but it’s a bit dispersed, so here it is condensed. Note that this is about looping audio that is on a server, not embedded in your swf. In that case it works out of the box.

The first thing you need is an uncompressed wave file (.wav) that contains a loop. Flash doesn’t support playback of wav files, so you need to convert it to a compressed format. You have two options here: mp3 or aac.

Mp3 has the advantage to be easy to use in Flash but unfortunately contains padding so looping it as is won’t go smoothly.

AAC can be use in Flash 10 and onwards with some trickery described here : http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player.html. It has the advantage of not containing padding, so it loops almost perfectly. If that’s enough for you, then good. If not, read on.

If you need perfect, then this post has a pretty good method for it. http://blog.andre-michelle.com/2010/playback-mp3-loop-gapless/ It however does not tell you how to get one necessary information: the number of samples in your loop. If you encode using LAME with the command line (binaries here ), then it will tell you the number of frames. The number of samples per frame is constant with mp3s, it’s 1152. So total number of samples in loop = number of frames * 1152.

Finally, I found this approach to create a loopable mp3 interesting, but I didn’t use it : http://www.compuphase.com/mp3/mp3loops.htm

amfPHP v2 Reloaded is out

the post:

http://www.silexlabs.org/the-blog/amfphp-v2-reloaded-is-out/

the files:

http://sourceforge.net/projects/amfphp/files/amfphp/amfphp-2.0.zip/download

Linked Resources in Flash Builder

When projects relate to each other in Flash Builder, things get messy with paths. Sooner or later you end up with an absolute path in your build configuration, and that means your colleague won’t be able to build on checking out. Relative build paths would be nice, but in the meantime I found a fix that alleviates the pain: Linked Resources. The name doesn’t say much, but what it comes down to is this:

You define a path as a constant, and use it everywhere in your build paths. That way, when your colleague checks out the various projects, the only place that needs to be changed is that constant. To define such a constant, go to Flash Builder Preferences -> General -> Workspace -> Linked Resources. Add a constant, say WORKSPACE_ROOT = /Users/admin/Documents/workspace/, then use it in your project properties. For example to get a project to publish at /Users/admin/Documents/workspace/common, instead of putting that path in Flex Build Path -> Output Folder, you can put ${WORKSPACE_ROOT}/common. In this way, when you set up a workspace, you don’t have to dig through project preferences, but just need to set the Linked Resource.

amfPHP v2 Reloaded Release Candidate 1 is out

news at Silex Labs : http://www.silexlabs.org/the-blog/fr/2011/06/amfphp-v2-reloaded-release-candidate-1-is-out/

download at sourceforge: http://sourceforge.net/projects/amfphp/files/amfphp/amfphp-2.0RC1.zip/download

State of amfPHP

http://www.silexlabs.org/the-blog/fr/2011/04/state-of-amfphp/