Who doesn’t know SWFObject & SWFAddress? These two JavaScript buddies are the best a serious Flash Developer can have.
SWFObject embeds your Flash nicely and browser independent, it has gone a long way and now it’s even the default publishing method in Flash Builder and Flash Catalyst (not sure about Flash CS5 ), you can read a more detailed history on the projects history site.
SWFAddress is a small library that provides deep-linking functionality in your Flash projects, it enables you to create unique virtual URL’s which enables Search Engines to index your flash content and of course the utilisation of the browsers back and forward buttons eg. history capabilities.
Usually in our development process we integrate these 2 buddies right at the beginning of the project, before we even code any AS3 line, these two are already in the html template inside FlashBuilder. Last time I started a new project I downloaded the latest versions (at that time) from these libraries and implemented them. Everything was working fine, and it works fine, but sadly only on FF3+ and IE8.. what happened to the strength of SWFObject?
After scrolling through a few posts and forums I decided to gradually downgrade every version of each Library backwards to see what happens. I must mention that the default embedding and display of flash content works perfectly, but when you need to send flashvars or parameters to your swf, there’s when things break.
Solution?
It’s an easy one, but painful to find out as it took me a few hours to get it to work.
SWFObject and SWFAddress are in deed buddies, but they need to be coordinated properly.
First pitfall:
The order that the javascript is being placed is very important, you NEED to place it in the order:
1. SWFObject 2. SWFAddress all other Javascripts you might have in place shouldn’t bother these two, but it’s always safer to put your custom stuff after the SWFAddress import.
Second pitfall:
There are various versions of each library some work together some don’t. I didn’t had the time to create a nice working table, but I promise you that I’m going to post one in the near future, but I can tell you what definately works 100%, SWFObject 2.2 & SWFAddress 2.2, yes both libraries with the same version number.
Third pitfall:
Sometimes ( I can’t tell you in which formation ) flashvars as parameters don’t get through to the SWF, the only workaround I found was to instead of using a parameters array I’ve passed an arguments array, that fixed all the troubles.
I know it’ s weird and I would like to elaborate more on this, but currently I just don’t have the time to do it, but don’t be afraid I will get a list up soon with my testing results.
If you have any questions to this topic, drop me a line and I will try to help you out.
UPDATE:
Changed version numbers from 2.3 to 2.2, thanks to Ven

The SWFObject & SWFAddress – compatibility by Tiago's Weblog, unless otherwise expressly stated, is licensed under a Creative Commons Attribution 2.5 Switzerland License.





Where did you find SWFObject2.3? The latest on google code is 2.2.
Thanks Ven, good catch. updated!
I’ve just begun learning. You are writing you this letter would be very helpful for me.
I had similar issues last project I did. That made me switch to jQueryFlash and that is now part of my standard HTML template. The embed syntax is also a lot cleaner I think.
Hi Øyvind
Thanks for the hint, going to take a look at it and test it out carefully.
I’m using SWFObject 2.2 + SWFAddress 2.5, no issues.
You can find SWFAddress 2.5 here: https://swfaddress.svn.sourceforge.net/svnroot/swfaddress/trunk/swfaddress/src/
that sounds good, have you also tried on IE7 passing flashvars to the .swf?