How to embed the myVR ActiveX/Plug-in

Some Internet Browsers have changed how they handle plug-in content so that user interaction is needed e.g. the user is required to click on the plug-in before they can interact with it. Usually, the browser will display a tooltip when hovering over the plug-in telling and informing the user with "Click to activate and use this control". The sample embed code for the myVR ActiveX/Plug-in listed below avoids this problem. However, this does make the embed code slightly more complex.

Copy and paste the sample code to embed the myVR ActiveX/Plug-in into your own web page:

This is an example of embedding the myVR viewer in a web page. This has been tested on Internet Explorer version 6, 7 and Firefox 2.0.0.9

This sample code will also automatically load the farm sample model and hide the toolbar.

<!-- Start of myVR object !-->
        <!-- Load plugin from an external javascript, this bypasses 'click to activate' in browsers !-->
        <!-- Remember to duplicate any parameters for the noscript alternate below !-->
        <!-- This is not the shortest and most elegant embed code, but is the only way we have found at present that supports virtually all browser types !-->


        <script>
                // Size and any param tags as javascript variables, remember to use the same values below also.
                var myVRsize = 'width="980" HEIGHT="640"';
                var myVRaltText = 'http://updateserver.myvr-software.com/netsetup/install_help.php';
                var myVRpluginParams = '<param name="url" value="myvr://3d.myvr-software.com/farm/farm.myvr" />';
        </script>
        <!-- This outputs the actual object !-->
        <script src="helpers/myVRplugin.js">
        </script>
        <!-- Start of alternate method for browsers with javascript disabled !-->
        <noscript>
        <!-- Nested object tag to handle all browser types !-->
        <!-- The first object tag is used by Internet Explorer, all version from 4-7 !-->
        <object name="myVR" id="myVR"
                classid="CLSID:F81002C0-2547-44F6-31B5-C2C500010001"
                codebase="http://updateserver.myvr-software.com/netsetup/myvrax.cab"
                width="980" height="640">
                <!-- Parameter tags go here, must be duplicated below also !-->
                <param name="url" value="myvr://3d.myvr-software.com/farm/farm.myvr" />
                <!-- Internet Explorer does not handle nested object tags well so we use conditional !-->
                <!-- commenting to hide the second object tag from Internet Explorer, !-->
                <!-- all other browsers will use the inner object tag !-->
                <!--[if !IE]> <!-->
                <object type="application/myvr" name="myVR" id="myVR"
                        width="980" height="640" class="hiddenObjectForIE">
                        <!-- Duplicate all param tags from above here !-->
                        <param name="url" value="myvr://3d.myvr-software.com/farm/farm.myvr" />
                <!--<![endif]-->
                        <!-- What to show if no viewer is installed at all. !-->
                        <iframe src="http://updateserver.myvr-software.com/netsetup/install_help.php"
                                width="980" HEIGHT="640" frameborder="0" border="0" scrolling="no">
                        </iframe>
                <!--[if !IE]> <!-->
                </object>
                <!--<![endif]-->
        </object>
        </noscript>
        <!-- End of alternate method !-->

<!-- End of myVR object !-->