Using Cult3D objects on the WWW

 

The technique used to embed a Cult3D object in an HTML page in a way that is compatible both with Netscape Navigator (version 2.0 or later) and Internet Explorer (version 3.0 or later) is, unfortunately, somewhat complex. Luckily, there is a "recipe" which you can follow, and which is described in the following sections. If you're not interested in the details, just read the sections "Preparing your web server", "The basic recipe" and "Cult3D plug-in parameters", and have a look at the examples in the last section. If you want to know what the various fixed attributes do, you may also want to read the section "Specific OBJECT and EMBED element attributes". If you want to understand why you have to do things in such a contrived way, you should also read the section "Some technical details".

 

Preparing your web server

In order for your visitor's browser to recognize a Cult3D object, you have two options. The better is to install the Cult3D MIME type "application/x-Cult3D-object" with the file suffix/extension ".co" on the web server at which your object resides. (Your webmaster should know how to do this.) If for some reason this is not possible, you should instead use the TYPE attribute in the EMBED element (see EMBED attributes element in section "Specific OBJECT and EMBED element attributes" below).

 

The basic recipe

To use a Cult3D object in your HTML page you need to specify some information for the browser. The minimum it should know is where the object resides and the width and height of the window showing the object. You may also want to send some optional parameters to the Cult3D plug-in, to further specify the appearance and behavior of your object.

To embed a Cult3D in your HTML page you can use the following "skeleton":

<OBJECT CLASSID="clsid:31B7EB4E-8B4B-11D1-A789-00A0CC6651A8"

CODEBASE="http://www.cult3d.com/download/cult.cab"

WIDTH=width

HEIGHT=height

>

<PARAM NAME="SRC" value=source-url>

more object parameters 

<EMBED

TYPE="application/x-cult3d-object"

PLUGINSPAGE="http://www.cult3d.com/newuser/index.html"

SRC=source-url

WIDTH=width

HEIGHT=height

more embed parameters

>

</EMBED>

</OBJECT>



Copy the skeleton into your HTML page and supply the appropriate width, height, source-url and, if applicable, more parameters. As you see, you need to specify all parameters twice, once for the OBJECT element and once for the EMBED element. Follow these steps:

  1. Supply the source-url. This is the location of your Cult3D object. (You need to insert this in two places.)
  2. Supply the width and height. This is the size of your Cult3D object's sub-window in your page, in pixels. (You also need to insert these in two places.)
  3. If your web server already has a registered MIME type for Cult3D objects, remove the TYPE attribute from the EMBED element.
  4. Determine if you need to specify any further parameters. These are described in the section "Cult3D plug-in parameters" below. For each parameter param with value value, insert one line in the more object parameters part on the form

    <PARAM NAME="param" VALUE=value>

    and one line in the more embed parameters part on the form

    param=value

So, for example, let's say you want to insert the object "myobject.co" in your HTML page. You want it to appear in a sub-window that is 240 pixels high and 320 pixels wide, and you want it to rotate about the Y-axis at a speed of 0.5 revolutions/second. Let's assume your web server is configured correctly, so you don't need the TYPE attribute. Following the steps above should give you the following:

<OBJECT

CLASSID="clsid:31B7EB4E-8B4B-11D1-A789-00A0CC6651A8"

CODEBASE="http://www.cult3d.com/download/cult.cab"

WIDTH=320 HEIGHT=240>

<PARAM NAME="SRC" VALUE="myobject.co">

<PARAM NAME="AXIS" VALUE="Y">

<PARAM NAME="SPEED" VALUE="0.5">

<EMBED

PLUGINSPAGE="http://www.cult3d.com/newuser/index.html"

SRC="myobject.co"

WIDTH=320 HEIGHT=240

AXIS="Y"

SPEED="0.5">

</EMBED>

</OBJECT>


This should work.



Specific OBJECT and EMBED element attributes

This section describes the various attributes specific to the OBJECT and EMBED elements. You don't need to read this to get a Cult3D object onto your web site, but we still recommend that you at least gloss through this information, to get a better understanding what's going on.

 

OBJECT element attributes

 

EMBED element attributes

 

Cult3D plug-in parameters

There are a number of optional parameters that you may use to modify the (initial) appearance of your object:

 

Some technical details

Why do we have to do things in such a roundabout way? Well, the problem stems from the fact that Internet Explorer and Netscape use different mechanisms to extend their run-time behavior with plug-ins.

Netscape started supporting plug-ins long before there was a standard for it. They did so by introducing the EMBED element and defining their own plug-in format. The EMBED element has never been part of the official HTML standard, but it is supported, more or less, by many browsers on the market.

When this kind of functionality was later standardized in HTML 3.2, it was done through the introduction of the OBJECT element. Internet Explorer uses this to identify an ActiveX control to be used with the plug-in data.


So what we have is two different mechanisms by which the behavior of a browser can be extended: the EMBED element for Netscape plug-ins, and the OBJECT element for (among other things) ActiveX controls. Internet Explorer does support the former, to some extent (but not well enough to be compatible with Cult3D). Netscape pre-4.0 doesn’t support the latter at all, and though Netscape 4.0 does, it doesn’t know how to deal with ActiveX controls.

Fortunately, the OBJECT element is designed to deal with this kind of problems. "Old-time" browsers (such as Netscape pre-4.0) that aren’t aware of the OBJECT element will just ignore it, and all enclosed PARAM elements, as it doesn’t know what to do with them; they will, however, try to interpret anything else enclosed in the OBJECT, such as an EMBED element. Newer browsers, that are aware of the OBJECT element, but that don’t support its use with ActiveX controls (such as Netscape 4.0) will do the same. And browsers that support the use of the OBJECT element for specifying ActiveX controls (such as Internet Explorer 3.0 or newer) will interpret it, together with any enclosed PARAM elements, and ignore anything else enclosed in the OBJECT, such as an EMBED element. So, if we use the "skeleton" described above, we have a piece of HTML code that will cause Netscape to see an EMBED element, and Internet Explorer to see an OBJECT element specifying an ActiveX control—which is what we wanted.

 

A couple of concluding examples

We conclude with a couple of examples of how an embedded Cult3D object might actually look in
an HTML page. Example #1:


<OBJECT

CLASSID="clsid:31B7EB4E-8B4B-11D1-A789-00A0CC6651A8"

CODEBASE="http://www.cult3d.com/download/cult.cab"

WIDTH=300 HEIGHT=250>

<PARAM NAME="SRC" VALUE="cycoke.co">

<PARAM NAME="INITROTX" VALUE=0>

<PARAM NAME="INITROTY" VALUE=0>

<PARAM NAME="INITROTZ" VALUE=180>

<EMBED

PLUGINSPAGE="http://www.Cult3D.com/newuser/index.html"

SRC="cycoke.co"

WIDTH=300 HEIGHT=250

INITROTX=0

INITROTY=0

INITROTZ=180>

</EMBED>

</OBJECT>

Example #2:


<OBJECT

CLASSID="clsid:31B7EB4E-8B4B-11D1-A789-00A0CC6651A8"

CODEBASE="http://www.cult3d.com/download/cult.cab"

WIDTH=320 HEIGHT=240>

<PARAM NAME="SRC" VALUE="objects/cult3dcube.co">

<PARAM NAME="BGCOLOR" VALUE="ffffff">

<PARAM NAME="AXIS" VALUE="Y">

<PARAM NAME="SPEED" VALUE="0.01">

<PARAM NAME="LINK" VALUE="http://www.Cult3D.com">

<EMBED

PLUGINSPAGE="http://www.Cult3D.com/newuser/index.html" 

SRC="objects/cult3dcube.co"

WIDTH=320 HEIGHT=240

BGCOLOR="ffffff"

AXIS="Y"

SPEED="0.01"

LINK="http://www.Cult3D.com">

</EMBED>

</OBJECT>

 

 

Happy webbing!

 

 

 

 

Cult3D is a trademark of Cykar Computers - Cykår AB. All other brand names, product names, or trademarks belong to their respective holders.