[2330] | 1 | <!--
|
---|
| 2 | ###############################################################################
|
---|
| 3 | ##
|
---|
| 4 | ## ## ######
|
---|
| 5 | ## ###### ###
|
---|
| 6 | ## ## ############### Shark 3D Engine (www.shark3d.com)
|
---|
| 7 | ## ########## # # #
|
---|
| 8 | ## ######## Copyright (c) 1996-2007 Spinor GmbH.
|
---|
| 9 | ## ######### # # # All rights reserved.
|
---|
| 10 | ## ## ##########
|
---|
| 11 | ## ##
|
---|
| 12 | ##
|
---|
| 13 | ###############################################################################
|
---|
| 14 | ->
|
---|
| 15 |
|
---|
| 16 | <body bgcolor="#e0e0e0">
|
---|
| 17 |
|
---|
| 18 | <h1>Shark 3D ActiveX Control Sample</h1>
|
---|
| 19 |
|
---|
| 20 | <ul>
|
---|
| 21 | <li>
|
---|
| 22 | Execute "win32_activex_install.bat".
|
---|
| 23 | <li>
|
---|
| 24 | This sample HTML page requires the Internet Explorer.
|
---|
| 25 | You cannot use for example Firefox.
|
---|
| 26 | (This is only a restriction of this sample HTML file.
|
---|
| 27 | The ActiveX control itself is not restricted to a particular browser.)
|
---|
| 28 | <li>
|
---|
| 29 | Ensure that scripting and ActiveX controls are enabled.
|
---|
| 30 | <li>
|
---|
| 31 | Check if the ActiveX window below does not display a red cross.
|
---|
| 32 | A red cross indicates that the Shark 3D ActiveX control
|
---|
| 33 | could not be loaded.
|
---|
| 34 | <li>
|
---|
| 35 | After pressing the button, please wait until the player is initialized.
|
---|
| 36 | This may take some time.
|
---|
| 37 | <li>
|
---|
| 38 | If the engine is running, you first have to click into the window
|
---|
| 39 | to activate it.
|
---|
| 40 | <li>
|
---|
| 41 | Then you can look around by holding the mouse button down
|
---|
| 42 | and moving the mouse.
|
---|
| 43 | You can move by using the keys.
|
---|
| 44 | </ul>
|
---|
| 45 | <p>
|
---|
| 46 |
|
---|
| 47 | <button id="id_button" onclick="func_init_player()">
|
---|
| 48 | Initialize Shark 3D Player.
|
---|
| 49 | </button>
|
---|
| 50 | <p>
|
---|
| 51 |
|
---|
| 52 | <object id="id_player" width=640 height=480
|
---|
| 53 | classid="clsid:2011f075-d228-4666-b06f-181420eab59f">
|
---|
| 54 | </object>
|
---|
| 55 | <p>
|
---|
| 56 |
|
---|
| 57 | <script language="javascript">
|
---|
| 58 | function func_init_player()
|
---|
| 59 | {
|
---|
| 60 | // Disable button:
|
---|
| 61 | id_button.disabled = true;
|
---|
| 62 |
|
---|
| 63 | // Check browser:
|
---|
| 64 | if(navigator.appName != "Microsoft Internet Explorer")
|
---|
| 65 | {
|
---|
| 66 | alert("This sample requires the Microsoft Internet Explorer.");
|
---|
| 67 | }
|
---|
| 68 | else
|
---|
| 69 | {
|
---|
| 70 | // Calculate the base directory of the project:
|
---|
| 71 | var ownurl = "" + document.location;
|
---|
| 72 | var splitidx = ownurl.length;
|
---|
| 73 | while(splitidx > 0 && ownurl.charAt(splitidx - 1) != '/')
|
---|
| 74 | splitidx--;
|
---|
| 75 | var dir = ownurl.substr(0, splitidx).replace("file:///", "");
|
---|
| 76 |
|
---|
| 77 | // Calculate the config file name of the project:
|
---|
| 78 | var cfg = "file://" + dir + "win32_run.cfg";
|
---|
| 79 |
|
---|
| 80 | // Launch the Shark 3D player:
|
---|
| 81 | id_player.changedir(dir);
|
---|
| 82 | id_player.create(cfg);
|
---|
| 83 | id_player.focus();
|
---|
| 84 |
|
---|
| 85 | // Send a message to the Shark 3D player:
|
---|
| 86 | id_player.callStr("report_note", "Message from HTML.");
|
---|
| 87 | }
|
---|
| 88 | }
|
---|
| 89 | </script>
|
---|
| 90 |
|
---|
| 91 | </body>
|
---|