14 Nov 2007
SWFAddress 2.0 wasn't initially planned. Back in February I started adding improvements with version 1.2 in mind. Little by little the number of features and samples increased a lot and now we can really talk about a major release. I want to thank everyone who contributed ideas, requests, bug reports and comments.
As most of the SWFAddress users already know, the combination of ExternalInterface and getURL causes big troubles for both IE 6 and 7. We don't know the reason for this behavior, but since things like popup or new windows, email and PDF links are something absolutely normal, I've decided to ease the designer's life by providing two helper methods for dealing with such cases. The first one is SWFAddress.href(url, target) which can be used for any type of links and protocols, and the second is SWFAddress.popup(url, name, options, handler) which on the other hand can be used for popup windows. Additionally the built-in browser methods for history manipulations (back, forward, go) are also exposed to SWFAddress.
The automatic Google Analytics tracking that came out with SWFAddress 1.1 was well accepted, but sometimes when custom behavior is needed you may want to do it completely on your own. Initially I've added a method that disables the tracking, but with the recent news about the upcoming improved Analytics version this was changed. With SWFAddress 2.0 you can provide your custom tracking function and do whatever you want inside of it. The default value is still 'urchinTracker', but you can set it to 'null' if you want to disable the tracking, you can bind it to another tracking system or take advantage of the multiple trackers that the new Google Analytics will support.
Something that might not get very popular, but still interesting is that you can now disable the creation of history entries. This means that SWFAddress will still produce deep links, but the Back/Forward buttons won't work in the context of your website or application.
With SWFAddress 2.0 you will no longer be limited to a single Flash object. Initially the project was targeting full Flash websites, but the reality shows that there are lots of interesting cases where multiple SWF files can utilize deep linking simultaneously.
So far so good, but there also many new things regarding the SWFAddress samples. All the SWFAddress 1.x Flash based samples no longer use strange arrays and calculated frame numbers. The logic now is much simplified and relies on frame labels. Additionally there's a detection that can point the user to a 404 error page when the requested deep link is not found. The SWF files are intentionally larger, so that the streaming can be tested and fixed in Internet Explorer. The MTASC sample is updated with different usages of the new link, popup and history helpers. The SEO sample was cleaned up and now it provides a better separation between the content and the presentation.
One of the key features of SWFAddress is the ability the work automatically with the Flash embedding script, which in most of the cases is my favorite SWFObject. Although it was always possible to use SWFAddress with other embedding approaches, now SWFAddress 2.0 adds the same out of the box transparent support for SWFObject 2.0, UFO and the Adobe's Active Content embedding script. Basically we want to cover every possible case and user preference and even that SWFObject 2.0 is still in beta testing, we're very happy to be compatible with it. Of course, there are dedicated samples for each scenario coming up on Friday.
I'm happy to announce that I received valuable support from Jon MacDonald and Petyo Ivanov. Jon helped me with the documentation and contributed a lot to the new Flash CS3 sample which utilizes ActionScript 3.0 and SWFObject 2.0. My friend Petyo from the Bulgarian Flash community created a Ruby on Rails port of the new SEO sample, which can be a good base for any Rails hacker who want to build an indexable Flash or Ajax powered website.
SWFAddress 2.0 will come with an API reference available in multiple languages. Although it's not very extensive for the moment, it's a step in the right direction and we'll continue to improve it in the future.
Tomorrow I will write down some information about the new Ajax and SEO enhancements.