Monthly Archives: July 2010

URL Alignment


SWF files (Flash and Flex output) are not naturally aligned with web browser. It is thus the responsibility of the developer to make sure that a SWF file responds to input from the URL in terms of supporting back button behavior, bookmarks, and deep linking. I believe that this lack of default alignment with the web browser is one of Flash’s biggest best practice gaps as a platform and one that is surprisingly easy to fix.

SWFAddress

I have standardized all my use of Flash/Flex with SWFAddress. It is a simple, small js/as library that provides deep web browser integration. Adding SWFAddress to any application will instantly make it far more aligned with the web in adding support for back button, deep linking, and bookmarks.

Providing end users the ability to deep link into any part of your SWF application is essential and really simplifies development. Given the growing concept of States, the ability to instantly link to any state with an application provides great end user value and is really easy to do. Simply map the states API to SWFAddress events and you are all set. Better still if URL Alignment is a top priority within your application, you can make programatic entry points into your application with just a url. This can often avoid the need for overly complex inner app navigation and makes your app much more open to user customization. Say as a user I had one screen I use every day for an account I manage, it makes sense to bookmark it. Here is a sample application I wrote that does just that, source included.

Sample Application
Link to Customers View
Search for the Red Bull Account
Create a new Ad for Red Bull’s Account

Here is the source!

As developer we tend to think about inner SWF interaction only and avoid any type of browser integration. The problem is that end users depend on the browser and when the back button unloads a Flex application, it can be a real problem especially in Enterprise conditions. There are many users who work inside of Flex applications every day in their daily work and hearing their complains is a real eye opener.

Please take some time to explore SWFAddress, it is a great library and adds some essential value to Flash in terms of URL Alignment. Adding deep linking, bookmark, and back button support into your application is really important and with SWFAddress easy.

Special thanks to Maria Lubenova and Rostislav Hristov at Asual for SWFAddress!

Cheers,

Ted :)