For what’s it worth: I’ll be giving an (online) talk about ActionScript development in Brazil December 18 (next thursday), at 22hs local time, courtesy of the Adobe User Group for Rio Grande do Sul (AUGRS). This talk will be in Brazilian Portuguese only, and it’s aimed at people who want to know more about the Actionscript development field; I’ll be talking about my experience in the area, as well as how I see it working for other people. It’s not overly technical, but I’ll be talking a bit about the tools developers have available; it’s not overly personal, but I’ll be showing some of my work to illustrate my points and talking a bit about my experience to put things into context. Find more information about the event (including link to the presentation room) here.
The presentation will also be recorded and available later, as well as all material involved.
Update: the starting time has changed, and it’s now set as 22hs instead of 21hs. Sorry for that.
Update (2): the talk was recorded and is now available online. It lasts for around 1 hour for the main presentation, and another 45 minutes for questions. Thanks to everybody who attended! The turnout and the result was better than I expected.
This is news to me: Google Analytics is updating their tracking features and adding better support for Flash tracking - it was possible before, but it’s just getting more native, as Google is even providing an AS3-based framework for that. Below’s the email that I’ve received through my Google Analytics admin account.
We are happy to let you know that the Event Tracking feature is now available in all profiles for the following Google Analytics Account ID: XXXXXX. Please note that you are receiving this email update because you are an ‘Admin’ or designated contact for the account listed above.
When you log in to these profiles, you will see a new set of reports called “Event Tracking” under the Content section. As posted on our blog, this is a limited release currently available only to select profiles.
Event Tracking allows you to track interactions with Web 2.0 style content such as Flash, AJAX, Silverlight, social networking apps, etc. We recently made tracking Adobe Flash even easier with the release of a new Flash Tracking client library. It allows for much simpler tracking of Flash content with drag and drop functionality and an open source framework.
To use Event Tracking, you will need to upgrade your site to use the new ga.js javascript. Detailed instructions on how to set up Event Tracking on your site are available on our CodeSite.
To find your ga.js code snippet, edit the settings for your profile and click the “Check Status” link on the upper right corner of the page. You can now track interactions beyond just pageviews.
As everybody knows by now, Adobe has made Alchemy - their C/C++ compiler for AVM2 (AS3-ish) SWF bytecode - available for download. We’ve seen highly visual demos, like Doom, and the old Quake 1 video where we got the first glimpse of what would become Alchemy. They’re very cool to show, and there’s some additional example libraries, but I guess Alchemy is ready for actual production uses of the technology; there’s not many such libraries shared yet.
Unfortunately I don’t have a long beard and I’ve never learned to be a proper C++ programmer, so the task of porting anything must fall on better hands. So, I’ll allow myself to post suggestions of a few libraries that I believe would make nice Alchemy ports in the hopes that someone more capable takes pity in our high-level, memory-managed struggle.
OpenCV is the standard free library used in Computer Vision projects - this means face, gesture, and motion recognition, as well as a lot more crazy skynet-like features. It’s normally used in platforms like Processing and vvvv. Having that available for Flash projects would be a real step forward.
Box2D is an open source 2D physics engine, largely responsible for the proliferation of physics-driven gameplay in amateur games. While we have Box2DFlashAS3 and other physics engines in Flash, having a straight port with better performance would revolutionize physics in Flash games.
ARToolKit is a library used for augmented reality - overlaying digital images into real world images. There’s also FLARToolKit now, but as with Box2D, a straight (if adapted) port would probably be nicer in terms of features and speed.
Honestly I have no idea of the portability for these projects; all I know is that they’re based on C/C++. However, they’re straight data processing libraries (maybe except for the rendering part of ARToolKit), so I think they wouldn’t be too limited by the player’s external capabilities and would make nice libraries to have available.
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.
He talks about it a bit more here. That work led him to create as3ansi, an ANSI parsing and visualization library for ActionScript 3. There’s a lot more about that here, with some sample code to illustrate; his event-driven ANSI parsing code is particularly awesome, considering the peculiarities the standard poses.
This may be hard to understand for people uninvolved with the underground BBS art scene around the 90’s, but for people who breathed that kind of 16-colored oxygen, seeing that come to life in a browser is wonderful - I spent a lot of time doing that and running a local ANSI art group, and heck, look at my businesscard. I’ve had my share of similar experiments about ANSI viewing in ActionScript in the past, but Peter’s work more than surpasses that. I can’t wait to see what the guys over at SixteenColors will make of it.
As I’ve just been waiting for it, I’ve now made my own crazy application/language/editor/experiment Fnk available as an AIR 1.5 application. You can install it from here (or a direct link to the .air file of the current version here). No fancy-schmancy AIR features yet; it has no auto updates or unrestricted file reading/writing or anything, so it runs pretty much like the browser version. But it’s certainly nice to see it running as a standalone application. As much as I enjoy having the ability to run something from the web (and it’s a core feature of Fnk), being able to double-click .fnk files and have them open on an editor is certainly convenient. Sort of ironic I guess, but since AIR allows us to deploy applications on both fronts almost seamlessly, I don’t have to choose what to support exclusively.
Straight and to the point, hopefully as a reference, because I had trouble finding the answer to problems on specific parts of the process. This considers you already have a normal Flex SDK project setup in whichever tool you’re using (I’m using FDT).
Be sure to download the latest version of Flex SDK command-line tools (I recommend the “Adobe Flex SDK” files, whichever version - stable if you wanna play it safe, nightly if you’re feeling lucky). You do not need to edit the config.xml files - it’s set to Flash 10 as default.
Change your regular AS3 compilation procedure to use amxmlc.bat instead of mxmlc.exe for compilation. The same compilation syntax applies so this should be pretty straightforward.
Create an AIR project. This page has a nice tutorial on how to do it. You don’t need to create the .mxml file though - as long as you use the same syntax you use to compile normal .as-based projects in mxmlc, it should work. Very important: the AIR XML file header should be set to use version 1.5. So the application tag start should read <application xmlns="http://ns.adobe.com/air/application/1.5"> instead.
Run your application with adl.exe instead of flashplayer.exe.
Optionally, the complete AS3 reference (including AIR) is available online. You can also download it in zip form from this link.
And remember AIR applications built for Flash 10 will require AIR 1.5 to install (the current version is 1.1). This means you can compile and run your application locally without a lot of trouble, but if you try installing your packaged Flash 10-based application on AIR 1.1, you’ll run into a misleading message that says the package requires an “older” version of AIR and that you need an “upated” version of the packaged application. For the installation to work, we’ll have to wait for AIR 1.5, which will come “this fall”. You can find more information about AIR 1.5 here.AIR 1.5 is now out so applications built with the method mentioned above will work.
I don’t know if anyone has noticed, but Adobe’s Flash Player Version Penetration stats page is still stuck showing statistics for June 2008. Considering the previous versions of the survey, the next update would have a column for September, and according to my not-so-empirical analysis of archived versions of the page, Adobe’s website would usually update with new information the same month of the column, or the following month tops; we’re already on November, however, and there’s no update for September so far.
Adobe may have just delayed the survey for one month – they did so in 2006, for example, when there was no March 2006 survey, but an April 2006 one (shortly before dumping NPD in favor of Millward Brown, by the way). Or maybe there’s something else, like a change in methodology or a delay so that some early Flash 10 penetration can be included. All my own speculation, though, as I can’t think of any real reason for such a delay.
Update: The stats page has been update with numbers for September. Thanks Adobe.
Almost 4 years ago I went back to college, to get a “Digital Interface Design” bachelor degree. This meant putting on hold a lot of things in my personal and professional life, but it also meant having contact with a lot of new stuff.
One of those new things I had contact with was node-based programming environments - more specifically, Max and vvvv. I did a number of college works using these programs, and even ported Tweener to vvvv for one specific college project.
That kind of dataflow-based, visual programming environment was quite inspiring for me. It doesn’t replace our more imperative method of writing code, but working with a more concrete approach to graphic and sound manipulation was a lot of fun and I wondered what would it be like if an environment like that was built in Flash. For one thing, because it could bring the joy of dataflow programming for a broader audience (no installation needed etc); and for another, because in some specific points I believed the interface for those programs could be easier to work with.
It turns out this is my last year in college, and that year is used exclusively for a final thesis project. After a lot of ponderation, in december of 2007 I decided that I’d tackle the problem and try creating a dataflow-based visual programming language of my own. The result is what I almost incidentally came to call Fnk.
This video demonstration shows some simple math-based animation being built from scratch on Fnk.
While the editor and the language are far from done - it’s not even beta yet - the result is an editor that looks and works a lot like Max, vvvv or Puredata: you create nodes with different types of data, and everything is in constant execution; you can change values and the programming as you go. The biggest difference is that it’s meant to be ran inside a browser.
Now, before someone jumps the shark, I’ll be the first to say this is not meant to be revolutionary or anything. It’s not meant to improve your workflow, and it’s not meant to be anything more than Max/vvvv/Pd; if anything, I’m trying to make it more accessible, but the very fact that it runs inside the browser also means it has many limitations of its own. To be quite honest, the project has no clear goal; as an academic project, I’m just trying to make something that’s fun to use, can serve as a good learning environment to learn about dataflow languages (and maybe a step towards Max/vvvv and others), and can basically help you prototype visual/interactive pieces. There’s a few features I’ll be exploring in the near future, like an AIR-based standalone version, allowing normal ActionScript SWFs to load and execute Fnk patches, and allowing HTML embed of patch players, but this is still all quite experimental.
Again, it’s not finished as the editor’s missing a number of features, and the language vocabulary is quite limited; it can only do some rudimentary String and Number manipulation, as well as draw circles (duh). I’m finally getting into its last step, however, which is adding new nodes to the language.
More about it on the project website, which is also pretty much a work-in-progress. You can launch Fnk here (please notice: it requires Flash 10 to run, even though no Flash 10 feature is visible yet). There’s also a bigger explanation on the project’s About page, with a link to the draft thesis paper (in Brazilian Portuguese only for now!), a few more test videos here, and many development screenshots here.
So yeah, other than real work, this is what has been keeping me busy for the last 10 months. It’s good to get it out of the system I guess.
Finally, just before anyone brings this up: no, this is not like Aviary’s Peacock, or Source Binder. While the fact that all of those environments employ noded-based visual programming can easily fool anyone into thinking they to the same kind of stuff, that’s pretty much where the similarities end. If anything, it can look a bit like Source Binder in terms of possible application target, but Fnk’s approach is at the same much lower-level (because you do not use third-party classes; you have to build your own visual code using Fnk’s nodes) and also higher level (because you cannot use your own Actionscript code inside of it; you have to build your own visual code using Fnk’s nodes). Fnk runs on the Flash platform, but it tries to create a complete abstraction from ActionScript. Also, maybe I don’t need to say this, but the Fnk project was started before I knew either of those environments existed (and honestly I’m glad they’re pretty different so my work isn’t redundant).
Picnik, the official online image editing software for Flickr (and others), has just added support for Pixel Bender, Adobe’s pixel shader-like platform. Users can not only use Pixel Bender files they have created or found online (say, from Adobe’s Pixel Bender Exchange), but also use an assortment of readily available filters inside Picnik. There’s a photo thread about it here, with users showing off the results of said filters applied to their own images (you have to go to Picnik’s main app and activate the “Sandbox” feature to use it; editing from Flickr won’t work).
This, and a few other similar developments, make me believe Flash Player 10 will have the fastest adoption rate of all player versions – big websites and online applications will want to push it out. Call me crazy, but I think in 6 months it’ll have a 90% penetration rate already – previous versions needed around one year to reach that mark – and we’ll all be able to target it without feeling too guilty about it.