The 3DSOM Flash Viewer is embedded in a web page using the standard
<object ...> and/ or the <embed
...> tags. The HTML file exported by 3DSOM Pro handles all this
for you but you need to know some more details if you wish to include
3D content in your own pages or reset the size of the Flash viewer
window. (Note you can also set the viewer window size using the
export optimizer tool see The Web Optimizer tool tutorial.) Here's
the typical HTML output from 3DSOM Pro.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>dino</title> <script src="dino_files/insert_content.js" language="javascript"></script> </head> <body> <script language="javascript"> insert_dino_content() </script> <noscript> <object classid="clsid\:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="600" id="3dsom_viewer" align="middle" > <param name="allowScriptAccess" value="sameDomain" > <param name="allowFullScreen" value="false" > <param name="base" value="dino_files" > <param name="movie" value="dino_files/3dsom_viewer.swf" > <param name="quality" value="high" > <param name="bgcolor" value="#ffffff" > <embed src="dino_files/3dsom_viewer.swf" quality="high" bgcolor="#ffffff" width="800" height="600" name="3dsom_viewer" base="dino_files" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> </object> </noscript> </body> </html> |
// simply insert the active content
// (avoids user needing to click on viewer to interact)
function insert_dino_content()
{
var str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
width="800" height="600" id="3dsom_viewer" align="middle" >';
str += '<param name="allowScriptAccess" value="sameDomain" >';
str += '<param name="allowFullScreen" value="false" >';
str += '<param name="base" value="dino_files">';
str += '<param name="movie" value="dino_files/3dsom_viewer.swf" >';
str += '<param name="quality" value="high" >';
str += '<param name="bgcolor" value="#ffffff" >';
str += '<embed src="dino_files/3dsom_viewer.swf" quality="high" bgcolor="#ffffff"
width="800" height="600" name="3dsom_viewer" base="dino_files" align="middle"
allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" >';
str += '</object>';
document.write(str);
}
|
| TIP: |
Make sure you change the 4 occurences of the viewer width and height — 2 in the HTML stub and a further 2 in the "insert_content.js" script in the model data folder. |
The format is XML with each line in the form...
<param name="XXX" value="YYY">
where XXX is the parameter name and YYY is the desired value.
The full list of parameters is defined in Flash Viewer Parameter Reference section. The most important parameters
you may wish to change are the rotateX and
rotateY which define the initial rotation about the image
X and image Y axes. The controls parameter defines
the relative path to the control bar movie and the
background parameter defines the relative path to the
backdrop image or movie.
If the "parameters.xml" file is not present, then no model will be displayed. This can be useful if you wish to script the viewer movie from another SWF file. e.g. A Flash movie to browse a set of 3D models. See Scripting the Flash Viewer section for more info.
| < Previous topic (About the 3DSOM Pro Flash Viewer) | Contents page | Next topic > (Flash Viewer Parameter Reference) |