I’ve done a little update to my system for enabling the back button and providing deep linking/bookmarking functionality for Flash sites and applications.
It’s now using Macromedias JS integration kit for Flash to JS communication.
I was hoping I would solve issues with some browsers that it was not working with previously, but since there is more issues than if the browser supports the setVariable command to pass data from JS to Flash it seems like it will be very difficult to get a few browser/OS combinations to work.
Basically I found two different methods of approach.
One is using Rober Penners hidden frame method.
That’s still what the system does for IE, but using an iFrame instead instead of a regular frame set and removing the need to create actual HTML files to load into the frame by using document.write().
With FF I did not have much luck with that approach.
Just using JS to write into the hidden frame worked fine and made the back button work, but when trying to also update the hash to enable the bookmarking everything started going wrong.
The other approach is to at regular intervals check the location.hash and if it’s been updated cause a change of state in Flash.
Both approaches have various problems on different browsers.
For example Safari apparently will not record a history event when you use document.write() to update an iFrame.
Opera 8 will not record a history event if you update the hash, and after experimenting a bit with writing into the iFrame I gave up on getting it to work with that method.
It would be great with a system that works for every perceivable browser and OS, but as long as the system fails gracefully it’s at least not doing any harm to implement and as it is now it will cover a vast majority of users.
So far I tested and confirmed it working with FF 1.0.6 and 1.5 beta 1, IE6, NS8 and Opera 8.5
Opera 8.01 does not show the hash and back button fails, but at least deep links are working.
I would be very interested to hear from mac users in particular to find out if NS, Safari and IE still is not working.