Question

I am currently building a flex application and would like to allow deeplinking to produce nice URLS such as http://site.com/#/account/settings and so on.

I have looked at swfaddress 2.4 and swfobject 2.2 to embed the swf and provide the deeplinking. So far everything works in Firefox and Chrome. However, in Internet Explorer 9, the back button and history functionalilty does not work, which is rather frustrating.

Interestingly, the Flex sample file here http://www.asual.com/swfaddress/samples/flex/ works pefectly in IE9. Upon futher inspection, it seems that they are using the ac_OETags.js file to embed their swf. Going through the documentation as well as the index.html file generated by flex, it seems that they are now using the latest version of swfobject as the preferred way to embed swf files.

Having said that, swfobject haven't been updated for more than a year. I am also unsure as to whether the author intends to update it. On the other hand, I do not like the way adobe's history.js works for deeplinking. Urls such as http://site.com/#view=1 looks very ugly in my opinion.

In light of the above, what libraries do you recommend for embedding swf files and deeplinking in a flex 4.5 project?

Was it helpful?

Solution

Those 2 are the best out there and I recommend you use both. With that said, I would try to debug the javascript/flex to see why this isn't working in IE9 and fix the code on both open source projects so that other developers can benefit from it.

OTHER TIPS

The reason this is happening is that Adobe never updated history.js after IE9 came out. There is code in there to handle some IE7 bugs which is being incorrectly triggered.

To fix your history.js insert the following code:

After line 22 insert:

ie9: false,

After line 72 (what was line 71):

else if (browser.version == 9)
{
    browser.ie = false;
    browser.ie9 = true;
}

That should fix it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top