One small correction: getFlashPlayerVersion() returns a JS object, so you 
need to instead compare like this:

if ((swfobject.getFlashPlayerVersion()).major == "0") {

--Kyle

--------------------------------------------------
From: "Getify Solutions, Inc." <[email protected]>
Sent: Tuesday, June 09, 2009 9:58 AM
To: <[email protected]>
Subject: Re: very frustrating issue with IE 8. Can someone please advise?

> Firstly, with SWFObject 2.2 that is coming out VERY SOON, we've rewritten 
> the version detection mechanism to be a lot more robust to corrupt 
> installs. That will most likely solve your issue, so you can try out the 
> 2.2 beta and see. If so, just wait for a little bit and we'll have that 
> out.
>
> --------------------------------
> However, if you must use 2.1 now, this is one possible (though not 
> necessarily recommended) option to consider.
>
> You can do version detection manually with various API functions from 
> SWFObject:  http://code.google.com/p/swfobject/wiki/api
>
> Specifically, the "swfobject.getFlashPlayerVersion()" and 
> "swfobject.hasFlashPlayerVersion(...)" functions.
>
> The strategy might be to do *both* a static and dynamic embed of the same 
> content, but have both hidden initially by having their containers set to 
> display:none by default. Then, use swfobject API function(s) to do your 
> own version detection, and if the version detection fails, just try 
> blindly the static method by unhiding the container for that static 
> content. If the version check passes, instead try the dynamic embed by 
> unhiding its container.
>
> The downfall is of course that you are assuming the "0.0.0" case is a 
> corrupt install rather than simply a no-flash-installed situation. So, you 
> lose the ability of swfobject static embed content to fallback gracefully 
> to alternate content in that case. What your users would get if no flash 
> was installed would be the ugly old-school blank white square with the 
> broken plugin embed icon in it. That case notwithstanding, your approach 
> would be a little more robust to people who had corrupt installs. Kind of 
> a bad tradeoff IMHO, but eh....
>
> Something looking like this:
>
> <style>
> #staticContentContainer { display:none; } /* hide the static content by 
> default by hiding its container */
>
> #dynamicContentContainer { display:none;} */ hide the dynamic content by 
> default, too */
> </style>
>
> <script>
> if (swfobject.getFlashPlayerVersion() == "0.0.0") {    // assuming an 
> invalid install rather than no flash player at all -- CAUTION
>   // now, (try to) show the static content by unhiding it's container
>   document.getElementById("staticContentContainer").style.display = 
> "block";    // unhiding the
>
>   // since you've overriden swfobject version detection, don't do the 
> register logic as you would normally.
> }
> else if (swfobject.hasFlashPlayerVersion("x.x.x")) {  // fill in the 
> appropriate min version for your content in place of "x.x.x"
>   // unhide the dynamic content placeholder's container
>   document.getElementById("dynamicContentContainer").style.display = 
> "block";
>
>   // proceed with dynamic embed as normal
>   swfobject.embedSWF("my.swf", "dynamicContent"....);
> }
> </script>
>
> <body>
>   <div id="dynamicContentContainer">
>         <div id="dynamicContent"></div>
>   </div>
>   <div id="staticContentContainer">
>       <object .....  <!-- rest of your object static embed syntax
>          ....
>       </object>
>   </div>
> </body>
>
>
>
>
> --Kyle
>
>
>
> --------------------------------------------------
> From: "Erik" <[email protected]>
> Sent: Tuesday, June 09, 2009 9:21 AM
> To: "SWFObject" <[email protected]>
> Subject: Re: very frustrating issue with IE 8. Can someone please advise?
>
>>
>> Dear Aran,
>>
>> Thanks for the link and the post. Yes, on IE, that page you mentioned
>> says I have flash version 0.0.0 installed (obviously incorrect).
>> However, that said, is there a way to combine the dynamic and static
>> publishing methods? It seems a common problem that the flash install
>> can be corrupted (it's the reason I moved away from using SWF Object
>> in the first place), and I can't expect the users on my website to
>> follow those instructions. I'd either like to find a way to gracefully
>> degrade to the static model if the dynamic fails, or I will have to
>> find another solution for embedding flash content.
>>
>> Thanks for your help!
>> Erik
>>
>> On Jun 9, 7:51 pm, Aran Rhee <[email protected]> wrote:
>>> Hi Erik
>>>
>>> Sounds like you have a corrupt Flash player install. If the this page 
>>> alerts
>>> that you have any version other then what you know you have (or not
>>> installed at all), then you know that the Flash player is not installed
>>> correctly:http://www.bobbyvandersluis.com/swfobject/testsuite_2_1/test_api_getf...
>>>
>>> For more info, check FAQ #2http://code.google.com/p/swfobject/wiki/faq
>>>
>>> Regards,
>>> Aran
>>>
>>> On Tue, Jun 9, 2009 at 10:41 PM, Erik <[email protected]> wrote:
>>>
>>> > Dear SWF users. I have been trying to install SWFObject 2.1 for the
>>> > last couple days and have run into a number of issues, which I'm
>>> > resolving 1 by 1, but it seems as soon as I solve one problem I have
>>> > another.
>>>
>>> > The last issue is that I decided on dynamic publishing for my flash
>>> > movie, created alternate content, etc. I separated adsense into an
>>> > iframe and analytics loading dynamically after the DOM is ready to
>>> > avoid slowing down the swf loading times.
>>>
>>> > Everything is working ok now, except one thing.
>>>
>>> > When I use static publishing, viewing the site with IE 8, the swf
>>> > loads just fine. In fact, IE 8 will load any flash file and clearly
>>> > has flash installed.
>>>
>>> > However, when I go to any site which uses dynamic publishing, the
>>> > SWFObject is not detecting the flash installation and saying I do not
>>> > have flash installed. This is true of my site, or any other site,
>>> > too.
>>>
>>> > What gives?
>>>
>>> > FYI, you can see my site athttp://www.rockyresort.com.
>> >>
>>
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to