I’m not very much of a radical, I believe, but I tend to judge development communities by the amount of negative or positive energy they seem to spread around. This is hard to put in objective terms, but as a positive example, I’d point to the PHP website – you have a fairly straightforward website and visiting the reference for each command will likely present you with hundreds of examples added by the community on how to use that command for all ranges of tasks. I’m not a professional PHP developer, but implementing features in PHP has always been super easy simply because of the community – the way they’re unattached to knowledge and unafraid to share it.
For me, the other side of the spectrum would be developing with Microsoft technologies. There are amazing exceptions like the XNA framework (which may be due to the nonexistence of a commercial exploration model until very recently), but overall finding answers or additional (free) libraries for certain problems using MS technologies has always been pretty difficult – for some reason, I always end up on forums and websites that require payment for solutions. There’s MSDN which is thankfully public, but I can’t forget how you had to actually buy the references in CD until some years ago, and I think that sort of approach influences how the community at large behaves.
So here I am, rushing to add Sound support to Fnk – the final version of the software for my thesis is due tomorrow. I manage to get FileReference (using the new Flash 10 capabilities which are now old hat in the whole project) to successfully load the data from a Sound file. Now I just want to play that. Simple, eh?
Not so fast. You can’t just feed Sound data to a Sound object – actually you can’t do that with any kind of “native” file that the player loads (to read a Bitmap, for example, I have to actually load the data as if it’s a Loader and .draw() it to a BitmapData).
But back to the point. I want to play sound from loaded sound data. A quick search on Google turns out this page, in which a guy talks about the very same issue and makes AS3 libraries for MP3 parsing freely available for download. Wonderful, I think. I mean, I’d love to implement it myself, or initiate an Adobe Make Some Byte Parsing campaign for a more native way to do it, but I’m in a hurry. So I quickly adapt it to my needs and 5 minutes later, Fnk is happily loading and playing MP3 data.
Then I compile an AIR 1.5 version of the app and it doesn’t work. Apparently it thinks I’m trying to load executable data and prevents the MP3 parsing classes from loading at all, throwing a security exception when the library tries to parse it.
It turns out a quick search on Google gives me this page where someone else tell what’s it all about and how to solve it. Bam, I patch my version of the libraries and I have it working 100% on both the Plugin and the AIR version of my software.
The ActionScript community may not have a central point of community knowledge like the PHP community does. But it’s amazing the amount of helpful folks and blog posts we can find when doing a Google search. This issue I had isn’t even something old and established – it relates to a very recent issue of a very recent feature. That there were people on it so fast and posting the solutions online amazes me to no end. Flash development may be something frowned upon by some of the most fervent free software advocates, but for some reason the community has managed to retain the ethos of a group where knowledge must be free and shared among everybody. I don’t know why that is, but it’s awesome.
Keith Peters said something similar (via Mike Chambers) a while ago and it got me thinking. It’s something I hadn’t realized at first, maybe because I already take that for granted. But the above experience I had just now was a wonderful realization of the impact of that all. I was thinking I’d need to implement my own MP3 parser, something that would probably be fun but take a while, or wait for Adobe to implement the data loading capabilities to this and maybe a dozen other classes… either way, I wouldn’t have that ready for my thesis. I read all kinds of ActionScript feeds daily, and I had seen no mention of that issue until then, so I really thought I was out of luck and ready to shove the standalone version aside and worry about it later; solving something so specific in less than half an hour was the kind of glad surprise I don’t always get.
So, thanks.
I felt that this is true as well as finding ActionScript help has ALWAYS been easier than searching CSHARP or any other .NET forums and communities (or lack there of).
Look who’s talking!!! Thanks to YOU too for sharing your work : )
And I agree, it’s pretty amazing to find so many people willing to share knowledge. I really hope Adobe keeps pushing the Open Source side of the Flash platform. Flex SDK, SWF specs, etc. Releasing the Flash Player itself would be absolutely amazing AND the final push for Flash into the Open Source world. I think it makes sense from Adobe’s point of view as I see it as one of the best ways to fight Silverlight. But I digress.
Just let’s all keep sharing.
Cheers!
J
thanks for the compliments. 🙂
I agree 100%. I absolutely love the AS community.
For the AIR app, beware of enabling allowLoadBytesCodeExecution. It’s there for your protection. Otherwise, it’s possible a well-crafted MP3 could trick your library into injecting SWF bytecodes into the application security domain.
Note that with AIR you have an even easier solution — just create a Sound object with an URL that points to the local file. In order to get the full path, use the more flexible File.browseForOpen(), instead of FileReference.browse().
The rest of your post is spot-on: this is an amazing community!
I hope the amazing community will remind each other that AIR provides some APIs that need to be considered carefully before using, and are best avoided if at all possible. You’ll recognize them by their scary long names. 🙂
Ethan: thanks for the tip. I was guessing it was more or less the case, I have to properly investigate the AIR features for file reading and make the application use them instead. In the above scenario, it was more for one specific presentation though, so the potential MP3 threat wasn’t something I was too concerned about.