Plug-ins

 

>

Internet Explorer and Netscape Navigator Plug-ins Briefly

For Internet Explorer, the 3Space player object plug-in is an ActiveX control. Don't be frightened by this terminology. You don't need to understand this complex technology to be able to use it. An ActiveX control is just a classical program that can be embedded inside another one called a container. Your are probably already an expert in using ActiveX controls inside containers without even knowing it. When you include an image inside a Word document, the image is handled by an ActiveX control. It's just a way to include new content inside documents handled by existing applications.

Even if the mechanism is different with Netscape Navigator, the behavior is pretty similar. But here we use a Java applet interface instead of an ActiveX control.

This document will explain you the basis of ActiveX control insertion inside Internet Explorer and applet embedding inside Netscape Navigator. Then we will see how to manage the ActiveX controls and Netscape Navigator plug-ins installed on your computer. Finally, we will talk about security problems you may encounter with plug-ins.

 

>

Inserting an ActiveX control inside HTML pages with Internet Explorer

Internet Explorer defines an extension to HTML to allow you to do that. The <OBJECT> HTML tag defines the name, size, location, identification and parameters of the ActiveX control you want to include in your HTML page. Internet Explorer handles the download and installation of ActiveX controls used in a page automatically. You just need to specify the URL of the "cabinet" file containing the plug-in. The installation is done only once.

For instance, here is the code that defines a simple 3SPace player object:

<OBJECT ID="myobj"
CLASSID="CLSID:1397AAF0-611B-4a52-B554-036601CFBC67"
CODEBASE="http://www.tgs.com/3Space/3space.cab"
STYLE="width:600;height:600" >
<PARAM NAME="XMLID" VALUE="scene">
<PARAM NAME="EXAMINER" VALUE="ON">
</OBJECT>

 

>

The important parameters are:

CLASSID The unique identifier of the ActiveX control. This number is the "identity card" of the ActiveX control. It must be specified to identify the control. If the system does not know this CLASSID, it means that the ActiveX control is not yet installed. Internet Explorer will then use the CODEBASE URL (below) to find it and install it. The 3Space lpayer CLASSID is:
CLSID:1397AAF0-611B-4a52-B554-036601CFBC67
WIDTH, HEIGHT The size of the ActiveX control window in pixels. It could also be given in percentage of the window size (width:100%;height:100%)
CODEBASE This is the URL of the file containing the ActiveX control. This type of file is called a cabinet. Generally, you should set this value to the default URL where the 3Space player is located: http://www.tgs.com/3Space/3space.cab.
If you want to distribute the 3Space Player from your own web site, please contact TGS for licensing. In this case, you can give a URL relative to the current directory and you should install a copy of the CAB file on your site.
The CODEBASE tag is used only the first time you install the plug-in.
ID This is the name of the 3Space player object in your HTML document. This name is useful for programming actions and behaviors using scripting languages such as JavaScript. If you include two 3Space player objects in the same document, called MyZapPlayer1 and MyZapPlayer2, you can access both of them in scripts by their name like this:
MyZapPlayer1.XMLID = "file1.z3d";
MyZapPlayer2.XMLID = "file2.z3d";
PARAM A parameter sent to the ActiveX control when Internet Explorer launches it. Each ActiveX control define a set of properties and methods that can be used by container applications. The PARAM tag is used to set the initial state of ActiveX control properties. For instance, the 3D ZAP player needs a ZAP file. You specify it as follows:
<PARAM NAME="XMLID" VALUE="scene">
We will give the list of parameters of the 3Space Player later.

 

>

Inserting a plug-in inside HTML pages with Netscape Navigator

Netscape Navigator defines an extension to HTML to allow you to do that. The <EMBED> HTML tag defines the name, size, location, identification and parameters of the plug-in you want to include in your HTML page. Netscape Navigator does not handles the download and installation of plug-ins used in a page automatically. You have to write it by hand or to propose to the user to visit first the TGS 3SPace page to load the plug-in and then to go back to your page.

For instance, here is the code that defines a simple 3Space player plug-in:

<EMBED type="application/x-z3d"
SRC="scene.xml"
EXAMINER="ON"
WIDTH="300"
HEIGHT="300"
MAYSCRIPT="true"
</EMBED>

type the MIME type of 3Space documents. Must be set to "application/x-z3d"
WIDTH, HEIGHT The size of the Netscape lpug-in window in pixels. Note that Netscape 4 does not support % values.
MAYSCRIPT Allow to access the plug-in methods from JavaScript. This must be set to "true".
SRC This parameter contains the name of the 3Space XML file.
EXAMINER A parameter sent to the plug-in at launch time. Each plug-in defines a set of properties and methods that can be used by container applications.
We will give the list of parameters of the 3Space Player later.

 

>

Putting it all together

Although the extension used by Netscape is different from the one used by Internet Explorer, there is a trick to allow both of them to exist in the same page without compatibility problems. Just do the following:

<OBJECT ID="myobj"
CLASSID="CLSID:1397AAF0-611B-4a52-B554-036601CFBC67"
CODEBASE="3SPACE.CAB"
STYLE="width:600;height:600" >
<PARAM NAME="XMLID" VALUE="scene">
<PARAM NAME="EXAMINER" VALUE="ON">

<EMBED type="application/x-z3d"
SRC="scene.xml"
EXAMINER="ON"
WIDTH="300"
HEIGHT="300"
MAYSCRIPT="true"
</EMBED>


</OBJECT>

<XML id="scene" SRC="scene.xml"> </XML>

An important difference between Netscape 4 and Internet Explorer is the fact that Netscape 4 does not support XML. The XML tag we use to describe the 3Space scene is ignored by Netscape. So we have to isolate the XML content in a separate file and to give this file name to the 3Space player in the SRC attribute or using the TSSetSource() method. Practically, this means that you cannot use XML Data Islands if you want to create portable 3Space applications.

 

>

Managing installed ActiveX controls:

Internet Explorer stores the ActiveX controls downloaded from an OBJECT tag in a folder called WINNT\Downloaded Program Files (for Windows NT 4 or 2000 systems) or WINDOWS\Downloaded Program Files (for Windows 95/98 systems). You can list the contents of this folder and delete files from it. If you want to remove the 3Space player from your system, open this folder, select the 3Space player object, click on the right mouse button and select remove.

 

>

Managing installed Netscape Plug-ins:

Netscape stores the 3Space plug-in downloaded from an APPLET tag in the file:
Program Files\Netscape\Communicator\Program\plugins\NP3SpaceCtl.dll
You can see the properties of all the installed plug-ins by opening the Help->About plug-ins menu. To remove a plug-in just remove the associated file.

 

>

Security

ActiveX controls and Netscape plug-in are unsecured. They can access all the system resources. Thus, it is usually recommended to disable the ActiveX control and plug-in download and activation. If you do so, the 3Space player won't be able to display objects.
However, the 3Space player object is a signed object. It means that its content is guaranteed to be safe by TGS and this guarantee has been validated by Verisign Inc.. This type of object can be downloaded safely.
If you set the Internet Explorer security level to the default value, Internet Explorer will prompt you when downloading ActiveX controls and will display the authentication information extracted from the CAB file. This allows you to control if an ActiveX control can be downloaded without risks. If you receive an unsigned ActiveX control, just refuse to install it.