From: Michael Litzkow <[EMAIL PROTECTED]>
Subject: Re: Direct Connection Between Applet and RealPlayer

Brad,

I don't think the ActiveX control supports the LiveConnect type of callback
that the Plug-in does.  There are a couple of other options you can use
though.  One is to set up a COM style callback mechanism, which is known
as a "connection point".  I did a quick test of this a while back, and
was able to get it to work.  I backed away from this method though because
my applet depended on a lot of COM specific Microsoft classes, and I didn't
want such a dependence in an applet.  The other way to go is just catch
the events from the ActiveX control in a one-line Javascript function, and
call into your applet from there.  From a theoretical point of view, it seems
too bad to go through the JavaScript layer to get to the applet, but on a
practical basis, it's really simple and doesn't introduce a lot of external
dependences.  Here's an example of one of my scripts.

<SCRIPT LANGUAGE=JScript FOR=RVOCX EVENT="OnGotoURL(url,target)">
        document.ControlApplet.onMarkerHit(url,target);
</SCRIPT>

"ControlApplet" is the ID of my applet, "RVOCX" is the ID of my control
panel (not the ImageWindow).  My control panel has 0 size, so it doesn't
show up.  I'm not sure whether you can catch the events from an Image
Window without a control panel.

If you're doing a cross-browser page, it's better to specify JScript as
the language than JavaScript.  Netscape doesn't recognize the FOR and
EVENT attributes, so it generates an error if you use JavaScript.  Since
Netscape ignores the JScript code, you get the right thing to happen
in IE and avoid the error in Netscape.

good luck,
-- mike



*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites.  Archives of RealForum can
be found at http://realforum.real.com

If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:

    unsubscribe realforum

or from another account, besides the address you subscribed with:

    unsubscribe realforum <[EMAIL PROTECTED]>

Reply via email to