If flash plugin is available, it is used. If it is not, the JavaScript version is used. Use the source code of this html page as a template for your project. This example makes use of swfobject project, but it is also possible to run the JavaScript version of the tool without loading swfobject.js.
Information about the JavaScript version can be found here: http://www.yofla.com/wiki/javascript:3d_rotate_tool_javascript_iphone
You can download this example here: example_Flash-JavaScript.zip