Using Active X Control on my own site

Post here for open discussions, feature requests, usage tips, sharing etc.

Using Active X Control on my own site

Postby Blochi on Wed Apr 23, 2008 6:11 am

Couldn't find any documentation on this.
How would I do it?

Christian Bloch
Blochi
New user
 
Posts: 4
Joined: Tue Feb 19, 2008 5:14 pm

Re: Using Active X Control on my own site

Postby XDepthAdmin on Wed Apr 23, 2008 3:10 pm

Hi Blochi,
implementation details can be found in the XDepth ActiveX Control User Guide, which is copied when the control is installed.

I suggest you download the ActiveX Control from our download page and install it, so you can also test your web pages on your local machine first.

By the way, here is a brief usage:

currently it is possible to use the XDepth ActiveX control only from an HTML page, using javascript.

The mechanism for embedding XDepth control is through the <object> HTML tag, this way:

Code: Select all
<object id="xdcont" classid="clsid:AB21F56B-651E-4644-994D-56B3E78F8047" CODEBASE="http://www.xdepth.com/ocx/XDepth.ocx#version=1,0,0,8" width="500" height="391"></object>


The "classid" and "codebase" parameters must be always exactly as shown above.
The "id" parameter indicates the name of the control object. This name will then be used in javascript directly and represents the XDepth control.
The "width" and "height" parameters are up to you instead. It must be noted that the control bar is 16pixel tall, thus if you specify an "height" that is exactly equal to the height of the image to display, the control bar will be drawn on top of your image.
If you specify instead a "height" equal to "image_height" + 16, the control bar will be drawn on a black background (like on our website).
As an example, you can use XDepth this way:

Code: Select all
<object id="xdcont" classid="clsid:AB21F56B-651E-4644-994D-56B3E78F8047" CODEBASE="http://www.xdepth.com/ocx/XDepth.ocx#version=1,0,0,8" width="500" height="391"></object>

<script language="JavaScript">
    function showImage(imgName) {
            imgOn = ("http://www.yourwebsite.com/images/" + imgName)
            xdcont.SetImagePath(imgOn)
    }
</script>


Now, you can call the javascript function "showImage()" wherever you want in order to send an image to the XDepth control.
Since you might be blocked by any "anti-hotlinking" protection, it is probably best to host the OCX on your own website, by changing the object tag as follows:

Code: Select all
<object id="xdcont" classid="clsid:AB21F56B-651E-4644-994D-56B3E78F8047" CODEBASE="http://www.yourwebsite.com/ocx/XDepth.ocx#version=1,0,0,8" width="500" height="391"></object>

Please let me know how it goes... we're eager to see your gallery. ;)
Carl Spencer
XDepth Forums Administrator
XDepthAdmin
Site Admin
Site Admin
 
Posts: 51
Joined: Sat Jan 26, 2008 12:48 am

Re: Using Active X Control on my own site

Postby Blochi on Wed Apr 23, 2008 9:28 pm

Thank you, giving it a shot.
Blochi
New user
 
Posts: 4
Joined: Tue Feb 19, 2008 5:14 pm


Return to XDepth ActiveX Control

Who is online

Users browsing this forum: No registered users and 1 guest

cron