How to detect Flash version and display appropriate SWF

Hi all,

I am using Flash CS4 and the new 3d tool, so need to publish my SWF for Flash player 10.

The problem I am having is that when I view the SWF on machines with Flash player 9 it obviously doesn’t work. It would be nice if only the 3d didn’t work, but none of the actionscript works, so my files loops ad infinitum.

I’m sure many people have had this problem (and it seems to me a bit of a lack of foresight from Adobe).

I have found some JS code to detect whether the user has flash or not and then display flash or an image, but I would like to detect if they have flash and which version it is, and then display either an image (if no flash) or a Flash 9 SWF or a Flash 10 SWF. Anyone know an effective way to do this? I can’t seem to find it.

Thanks a lot