SWF indexing is a red herring, and you should all know that by now

So, here we go again, Google has annonced that they will index SWF files with a new algorithm and the whole Flash blogosphere echobox is ringing with the words of the clueless. The announcement shows how little Google understands about Flash websites and needlessly diverts the attention away from developing a real solution to Flash website search engine optimization. The reaction to Google’s announcement also shows how little the Flash bloggers understand about the problem. I’m not sure which of these two is the most annoying.

Read the rest of this entry →

Death to AC_FL_RunContent

When your projects include SWF files created with Adobe Flash or Flex, the newly updated Insert Flash feature in Dreamweaver [CS4], which now uses the open source SWFObject 2.0 codebase

(From Adobe Edge: June 2008 via jonnymac. Emphasis mine.

Adobe has finally killed off their hideous Flash embed script, not a second too soon.

ActionScript generics in Flash Player 10?

In the prerelease version of Flash Player 10 there is support for type-safe lists in the form of the new class Vector. The class is an example of a parameterized type, meaning that you can have a vector of strings, a vector of display objects or a vector of any other type you like. Parameterized types are called “genetics” in Java and “templates” in C++ and it’s a really nice feature to have.

Unfortunately it seems like you can’t write your own parameterized types, Vector is what you get. Hopefully this is the first sign of things to come, perhaps there will be more in the next version of the player. Watch this space.

Just to check I’ve also tried some other ECMAScript 4 features like let, type and generic functions, but none seems supported.

Update: Seems like the parameterized types doesn’t work very well with push, shift and other array manipulation methods, they accept any type, even though they shouldn’t (likely because are implemented using variable argument lists, which is one of the cases where ActionScript’s typing system breaks down). Also, it breaks down for nested types like var list : Vector.<Vector.<String>> (which allows any vector type to be assigned to the vector, which it shouldn’t. This line should not compile list[0] = new Vector.<int>(), but it does).

Mate, an unobtrusive Flex application framework

If you are tired of application frameworks that tie your code together and makes it an unwieldy mess, take a look at Mate.

Mate is quite unintrusive, lets you configure your application declaratively in MXML and does most of the boring things for you. Judging from the documentation and examples it looks like good competitor in the less-than-crowded marked of Flex application frameworks.

The core of Mate is something called the event map which describes what should happen when your application dispatched events of different types. For each event one or more handlers can be invoked. A handler can be everything from calling a method on an object, running a command or invoking a remote object call and there is room for writing your own specialised handlers. Handlers can also run in sequence and get hold of the previous handler’s result, which makes it possible to create quite complex logic. All this is done in MXML, which means that your configuration is also the actual wiring of your application — and it’s readable and quite easy to understand.


My only objection is how Mate handles updating of views. If I understand it correctly, there are two ways, either you have an injector which looks up the view and pushes values into it, or you have an instance of a dispatcher in your view where you listen for result events and update accordingly. Both remove the benefits of bindings, and while they are certainly better than the global variable lookup of other Flex frameworks, I’m not sure I like them. On the other hand I think you can skip that part and inject the model into the views directly. On the third hand, injectors can potentially make your code more decoupled.

Update: see comments below for a clarification on this issue by the framework’s author.

New Whipping Floyd site released

Whipping Floyd SS08
Whipping Floyd SS08

Design by Magnus Heed of Whipping Floyd, website production by me. Fully deep-linkable, Google Analytics-integrated (automatically, thanks to SWFAddress).

How to save $149

Some jokers who call themselves flexinmotion have released a ridiculously overpriced Flex component which “will automatically track all user navigation clicks, button click, check boxes, radio buttons and a number of other controls within your app automatically” using Google Analytics. Let me show you how to save those 149 bucks.

Read the rest of this entry →

Architectural Atrocities, part 9: Cairngorm’s Model Locator pattern

From time to time I re-read the introductory articles on Cairngorm just to remind me of why I don’t use it and never will. This installment of the Architectural Atrocities series is a critique of the Cairngorm framework, and the Model Locator pattern in particular.

Read the rest of this entry →

Cleaning up the sound in screencasts using AirFoil

Most screencasts are done with minimal resources, usually just a guy and his computer. This usually means crappy sound with lots of noise. Watching a screencast the other day I realized that I could remove the annoying noise I was hearing by routing the sound through AirFoil and setting the equalizer settings to kill high-frequencies.

In version 3 of AirFoil you can not only send sound to an Airport Express but also other computers, and of course, your own. To clean up any sound, just set the application to route all sound (look for “System Audio” at the bottom of the list of sources) to your own computer (by clicking on the speaker button next to the computer in the list, in most cases there will only be one, yours). You can also choose just the web browser you are watching the screencast in as the source. When you have started routing the sound open the equalizer and modify to your heart’s content.

It would be great if AirFoil had noise-cancellation built-in because you can’t always remove the noise with the equalizer, it’s a blunt instrument. I’m sure that someone more clever could come up with a way to route the sound through noise reduction filters before using a similar method.

The downside is that you get some delay in the audio, but it doesn’t seem to be the full 2.5 seconds as when you send to an Airport Express. I’ve not even noticed it most of the time when I’ve been watching programming screencasts, probably because you don’t see the speakers lips moving and that the “action” is quite slow.

Less complex ECMAScript

Ajaxian today reports that the latest version of the ECMAScript 4 grammar seems to have tightened up the language and reduced it’s complexity somewhat. Ajaxian quotes Brendan Eich:

ES4 has overspent its complexity budget in order to explore a large design space. It is now shrinking to meet practical budgets involving Ecma member consensus, prime mover commitments, fatigue effects, community expectations, and the like. No one working on ES4 wants it to be like Perl 6. We aim to finish this year.

This is great news in my opinion. I liked the idea of tail calls, but frankly, the last version of ECMAScript 4 looked like they tried to include every feature of every other current language. The language was getting overwhelmingly complex and I hope that they have axed a significant part of the new features before the final version.

Separating event handling from event filtering

One thing that bugs me with event handling is that usually I’m not interested in every event that comes my way. This makes my event handlers more about filtering events than handling them — for example checking that shift is pressed when a KeyboardEvent comes around, or checking that a MouseEvent is above a specific area of a panel. To separate the concerns of filtering and handing I’ve come up with some AOP-like looking ActionScript. Read on for the full explanation.

Read the rest of this entry →