UPDATE: The new SWFObject 2.0 (Release Candidate 2) resolved this issue. The examples below should now give you the browser agent info when using IE6…
The one caveat, Firefox on XP needs wmode to be set to either “transparent” or “opaque”, otherwise a pop-up occurs.
******
Screenshot…
http://www.easternstorm.net/sassie/useragenttest/versionresults.jpg
On the left side observe IE6 loading the same swf, embedded in
standard Flex 3, SWFO 1.5, SWFO 2.0. Please note that that in SWFO
2.0 we receive “null”.
Now, the left two columns shows several other browsers loading the 3rd
template:
http://www.easternstorm.net/sassie/useragenttest/useragenttestSWFO20….
Note that it is working fine on Firefox XP, Safari 3 XP, Opera XP,
Firefox OSX, Safari 3 OSX. The only other exception being Safari 2,
which has known issues with externalInterface as I recall.
So clearly there is something not quite right with SWFObject 2.0
running IE6
***
Here are the three embed templates:
http://www.easternstorm.net/sassie/useragenttest/useragenttest.html
http://www.easternstorm.net/sassie/useragenttest/useragenttestSWFO15….
http://www.easternstorm.net/sassie/useragenttest/useragenttestSWFO20….
***
Source code of example:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml“
layout=”absolute” viewSourceURL=”srcview/index.html”>
<mx:Script>
<![CDATA[
private function Test():void{
Debug.text = "<<" + ExternalInterface.call("function getBrowser()
{varBrowser = ''+ navigator.userAgent;alert(varBrowser);return
varBrowser;}") + ">>";
}
]]>
</mx:Script>
<mx:VBox x=”10″ y=”10″>
<mx:Button id=”btnTest” label=”Click to View userAgent Info”
click=”Test()”/>
<mx:TextArea id=”Debug” width=”450″ color=”Navy” borderColor=”Red”/>
</mx:VBox>
</mx:Application>
0 Responses to “SWFObject 2.0 not returning userAgent in IE6 (anyone else encounter this?)”