We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27442
    • 103 Posts
    I suspect that I need to do something with the javascript within the web page, but I’m not quite sure what. We have a CAD program that can create a simple web page of a 3D model that can spin, rotate, etc. using the hoops stream format. The first time that a user views one of these pages, they are prompted to install an ActiveX control for the viewer. Here’s a simple example (IE required for functionality)- right click to zoom, pan, etc.

    Anyway, I’m attempting to incorporate this capability into a modx site and the model doesn’t seem to display. In modx I’m using a simple TV to reference the actual .hsf file. The basic html created by the CAD program is:
    <HTML>
    <HEAD>
    <TITLE>300551</TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    function initializeControl()
        {
        if (kcobj.DLinProgress == true)
            {
            setTimeout("initializeControl()",100)
            }
        else
            {
            kcobj.SetRenderMode("gouraud")
            kcobj.OpenModelSegment()
            kcobj.HC_Set_Visibility("lines=on, edges = (everything=off, perimeters=on)")
            kcobj.HC_Close_Segment()
            }
        }
    </SCRIPT>
    </HEAD>
    <BODY BGCOLOR="#000033" TEXT="#FFFFFF">
    <H1>300551</H1>
    <DIV ALIGN="CENTER">
    <OBJECT CLASSID ="clsid:AD5F3C4B-BD73-11D5-838B-0050042DF1E4"
    CODEBASE="http://www.hoops3d.com/downloads/hoopsatlcontrol.cab#version=-1,-1,-1,-1"
    NAME="kcobj" WIDTH="90%" HEIGHT="80%">
    <PARAM NAME="Filename" VALUE="300551.hsf">
    </OBJECT>
    <P>Download <A HREF="300551.hsf">300551.hsf</A></P>
    </DIV><SCRIPT LANGUAGE="JavaScript">initializeControl();
    </SCRIPT>
    </BODY>
    </HTML>
    

    I’ve taken the javascript from the head of this document & added it to the head of my template. Then, the the acutal modx document page is
    <DIV ALIGN="CENTER">
    <OBJECT CLASSID ="clsid:AD5F3C4B-BD73-11D5-838B-0050042DF1E4"
    CODEBASE="http://www.hoops3d.com/downloads/hoopsatlcontrol.cab#version=-1,-1,-1,-1"
    NAME="kcobj" WIDTH="90%" HEIGHT="80%">
    <PARAM NAME="Filename" VALUE="[*3Dmodel*]">
    </OBJECT>
    <P>Download <A HREF="[*3Dmodel*]">300551H.hsf</A></P>
    </DIV>
    <SCRIPT LANGUAGE="JavaScript">initializeControl();
    </SCRIPT>

    And I know that the [*3Dmodel*] TV is working properly and pointed to the correct .hsf file, because the download link works. Can anyone give me a clue how to handle this within modx? Thanks.
      • 27442
      • 103 Posts
      bump

      Nobody has any idea how to make this work?
        • 27442
        • 103 Posts
        Thanks. Just to be sure...... you got it to work inside a modx page as I described in the ’code’ fields? (not the link posted above which is not a modx generated page)