Asual

Tuesday,
29 Sep 2009

SWFAddress 2.4

I'm happy to announce the availability of SWFAddress 2.4 which appears to be the most stable and feature-full version up to date. It fixes some nasty issues that appeared in the previous release and introduces a few interesting additions. Here is the changelog:

  • New INTERNAL_CHANGE and EXTERNAL_CHANGE events.
  • Support for parameter arrays.
  • Improved IE8 support.
  • Fixed IE initialization issues.
  • Fixed browser communication issues with AS2/AVM2 on Mac.
  • Fixed URL decoding for AS1 and AS2.
  • Fixed handling of swfobject.createSWF.
  • Workaround for WebKit bug 20355.
  • Frameset support and corresponding sample.
  • All methods dealing with parameters and query strings no longer return empty strings.

The project became pretty mature but we'll continue to consider interesting ideas and requests. More open source goodness is coming soon.

Thursday,
18 Dec 2008

SWFAddress 2.2

The new SWFAddress has just arrived after seven months of active development, various contributions and lots of positive feedback from the community. The list of changes includes the following:

  • Refactored JavaScript implementation
  • New SWFAddress.swc AS3 component
  • New CS4 based Splash screen sample
  • New Digg API sample
  • New up() method for easier deep linking path navigation
  • New XSS protection that doesn't affect special characters
  • Support for Internet Explorer 8
  • Support for custom HTTP status messages in the SEO sample
  • Improved title handling
  • Improved unload event handling for IE
  • Updated Rails sample
  • Fixed getBaseURL() for AS3
  • Fixed Safari 2.0-2.0.3 support
  • Build-in fix for the Firefox 3/Mac OSX blinking effect
  • Additional onLoad fix for application/xml content type
  • Fixed optional options parameter for the popup method
  • Cross platform build script
  • Various optimizations

I believe that this new version is pretty stable and won't require an update soon. There are two known Safari bugs (19202 and 20355) that currently affect the project and we can only hope that they will make it's way into the next major release of the browser.

SWFAddress has grown significantly in the last two years and it's very likely that we're going to provide a lite version for users who need just the basic functionality. Very soon the same API will become available for Silverlight and we're also scheduling the development of a jQuery plugin.

Happy holidays!

Tuesday,
18 Nov 2008

Google Analytics for Flash

A cool new library for Google Analytics tracking was released yesterday at Adobe MAX. I learned about it thanks to webmonkey and I wonder why still there is no such info in the Adobe feeds.

So far the tracking of page views and events using the free Analytics tool from Google was pretty straightforward but still hard for many Flash developers. Basically it requires you to include a few lines in the HTML, call some JavaScript from Flash and eventually watch for security restrictions. The nice thing about this new project is that now it will allow you to do all this with just ActionScript. The quality of the library absolutely exceeded my initial expectations and I couldn't resist to not blog about it. You don't have to miss it if your projects require such functionality.

I'll be looking into integration between SWFAddress and GA for Flash in the near future. It won't make it into the upcoming release but I'm definitely interested in playing with it.

Wednesday,
9 Apr 2008

SWFAddress 2.1

Today is the third day of the 360Flex Europe conference and in about an hour I'm going to give a session about using SWFAddress in Flex 3. This is finally a good reason for a new release which has been postponed a few times since January. Enjoy the brand new SWFAddress 2.1 and send us feedback using the project forums.

The list of changes includes:

  • New SWFAddressOptimizer class that encapsulates the JavaScript SEO code and improves the HTML degrading of Flash websites.
  • New getPathNames and getBaseURL methods.
  • New Rewriteless sample for SEO support without URL rewriting.
  • New YouTube Player API sample for video deep linking.
  • New SWiSH Max2 sample.
  • Tomcat SEO sample ported to Flex.
  • Enhanced SEO sample.
  • Improved href and popup methods.
  • Safari 3 reload and popup blocker fixes.
  • Deep links validation for XSS vulnerabilities.
  • DOM fix for Firefox.
  • The new Google Analytics tracking is supported out of the box.
  • Strict mode no longer requires a slash at the end of the value.
  • The A2S/AS3 classes are available in the com.asual.swfaddress package.
  • Flex 3 compatibility.

The release includes many new improvements and various fixes. Some of you have probably seen the swfaddress-seo.js file which is now replaced with a new SWFAddressOptimizer class which fixes some issues and adds a Flash Player detection so that people without proper version won't get the deep linking redirect. The getPathNames() method can simplify the code in complex situations by providing an array containing all the pseudo folders in deep links like "/path/subpath/subsubpath/". The other new getBaseURL() method was made especially for the SEO enabled samples that now can easily provide "Copy link to clipboard" or "Digg it" type of functionality by exposing addresses without anchors and possibly improving your search engine positioning. The Rewriteless sample is for those of you who want to use the SWFAddress SEO approach, but don't have URL rewriting enabled. The YouTube sample was born a day after Google released the Player JavaScript API and showcases basic deep linking for video. Larry Benedict ported the basic sample to SWiSH Max2 and brought the SWFAddress functionality to a whole new group of developers. I spent some time rewriting the Tomcat sample in Flex 3 using custom SWFAddress powered components. Many people reported that the href/popup functionality fails silently because of the Safari popup blocker and this new release should fix it. Warren from Richmond discovered a nasty XSS vulnerability for Internet Explorer and thanks to him now the deep linking values are filtered for possible bad symbols. Because of the huge interest in the new Google Analytics code it's now supported automatically. Finally the ActionScript classes are distributed with packages which are much more suitable for larger projects. This enhancement happens during the build process and you still can find the classes without packages in the source folder and in many of the samples where simplicity makes sense.

The really good news is that the SWFAddress team is growing little by little. Max Tafelmayer recently joined the project and committed few high quality fixes. Mattew Tretter, who created StateManager will also help us improve SWFAddress with some of his excellent Safari tricks.

With this release we're also starting to reward all the generous donations with nice SWFAddress t-shirts. Check the donation section for more information.

Wednesday,
14 Nov 2007

SWFAddress 2.0 part 2 - Why it matters

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.

One of the first and main goals was the support for event listeners. Since SWFAddress is a class that provides only static methods, the addition of the EventDispatcher capabilities was a little bit tricky. I've used composition over inheritance in order to create a unified interface for both AS2 and AS3 while utilizing the built-in Flash event classes internally. A new dedicated SWFAddressEvent class now carries information about the SWFAddress value, path and query parameters. All this wasn't implemented for AS1 and projects utilizing this version will still have to rely only on the SWFAddreess.onChange handler. More important is that the event dispatching feature is fully available in JavaScript which opens a lot of opportunities for websites that use Flash only partially.

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.

SWFAddress 1.x wasn't restrictive at all about the format of the deep links which resulted in a variety of naming conventions. While I understand everyone's preferences I want to push the usage of the right convention with the introduction of a strict mode. This means that by default you will get slashes in the beginning and at the end of the deep link value. If you use SWFAddress.setValue('/about') in the change handler you will get '/about/', if you set the value to 'portfolio?id=3' you will later receive '/portfolio/?id=3'. The most important change in terms of backwards compatibility is the fact that SWFAddress.setValue('') now becomes SWFAddress.setValue('/') which looks much more correct. People who want to apply the latest JavaScript improvements to existing projects can disable the strict mode and later in this post you will see how this can be done easily. Once again I want to mention that a good convention will ease any future developments regarding search engine optimization. If you use values like 'myDeepLink' or 'my_deep_link', Google won't threat them as three separate words. The best possible naming for the moment is 'my-deep-link' and if you do some investigation on this topic you'll understand what I'm taking about.

An interesting new feature is the ability to customize the script with query parameters. I haven't seen this technique before, but since I believe that less code is better I spent some time implementing it. The initialization of SWFAddress happens after the DOM of the page is loaded and it's easy to detect if there are configuration options applied. For example, if you want to use the new JavaScript file with an existing project that you don't want to recompile you can just include 'swfaddress.js?strict=0' in order to disable the new strict mode. The list of supported options includes only properties that should be set once, like 'strict', 'history', 'tracker' and 'html'. Since the swfaddress.html is now optional and disabled by default, you can enable it and disable the tracking at the same time by using 'swfaddress.js?html=true&tracker=null'.

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.

Some of you might be exited that SWFAddress 2.0 also supports Flash Player 7. A few months ago I was asked by a client about such compatibility and the time good for implementing it. So there is a new IntKit sample coming which utilizes the Geoff Stearns' modified version of the Flash/JavaScript Integration Kit.

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.

Cheers!

« Previous Entries

Projects

Syndication

Blog Search

Blog Categories

Blog posts

Recommended sites