Tim, thanks for your patience. I've got a lot of it working, but no
click response. The link you gave helped quite a bit, but in reading
the description of how to get clicks, it doesn't seem at all clear to
me as to how to proceed with JavaScript. I suspect it's not do-able
in IE with JavaScript. It seems to me that it's do-able with NN, or
with IE and VBScript.
For example, the RealMedia doc
(
http://service.real.com/help/library...s/embedint.htm)
samples for callbacks (two of them) are for Netscape only. That
doesn't mean callbacks don't work in JavaScript, but... Also, the doc
has the following example, for VBScript only:
=============== ==
Receiving Callbacks Through VBScript
To receive callbacks through VBScript, you use
the <OBJECT> tag ID, shown here set to RVOCX:
<OBJECT ID=RVOCX HEIGHT=256 WIDTH=256
CLASSID="clsid: CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<PARAM NAME="controls" VALUE="all">
<PARAM NAME="SRC" VALUE="http://www.example.com/video1.rm">
</OBJECT>
You then use a <SCRIPT> tag to receive a VBScript callback.
The following example shows a callback for OnShowStatus:
<P>Status Text:
<input type="text" name="statusTex t" size=100><br></P>
<SCRIPT language="VBS">
Sub RVOCX_OnShowSta tus(byVal text)
statusText.Valu e=text
End Sub
</SCRIPT>
=============== ====
That doesn't work in JavaScript (at least as I've translated it, and
using OnLButtonUp):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled </title>
<SCRIPT language="JavaS cript">
function onClk (button_flags, x_pos, y_pos) {
alert ("onClk!!");
}
function OnLButtonUp(fla gs, x, y){
alert ("OnLButtonUp!! ");
}
function WinLoad() {
document.getEle mentById("RVOCX ").SetWantMouse Events(true);
}
</SCRIPT>
</head>
<body onLoad="WinLoad ();" onClick="alert( 'body click');">
<OBJECT ID=RVOCX HEIGHT=60% WIDTH=60% onClick="alert( 'click!');"
CLASSID="clsid: CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<PARAM name="MAINTAINA SPECT" value="false">
<PARAM name="AUTOSTART " value="TRUE">
<PARAM name="CONTROLS" value="ImageWin dow">
<PARAM NAME="SRC"
VALUE="file://D:\Program
Files\RealPlaye r\samples\clips \welcome.rm">
</OBJECT>
</body>
</html>
I get clicks in the body of the page, but not clicks on the RP
control.
Any ideas? Thanks again.
MichaelF
"Tim Williams" <sa************ @THISpacbell.ne t> wrote in message news:<Rx******* ***********@new ssvr14.news.pro digy.com>...
Have not done it in either - just gave you the link. There should be no
difference (essentially) between using vbscript and javascript.
Tim.
"MichaelF" <mf*******@MJFl anagan.com> wrote in message
news:44******** *************** ***@posting.goo gle.com... Tim, thanks for that. You're right about "id" vs. "name."
Looking at the link you posted, it looks to me as if I cannot control
RP in IE if I embed RP via <embed> (only NS). I may be able to do it
if I use <object>, but the doc doesn't explicitly say so. It shows
<object> and controlling via VBScript, but not JavaScript. Is that
how you read it? Have you done this in IE and JavaScript?
Thanks.
"Tim Williams" <sa************ @THISpacbell.ne t> wrote in message
news:<0a******* *************@n ewssvr14.news.p rodigy.com>... http://service.real.com/help/library...s/embedint.htm
BTW "name" is not the same as "id". If you want to use getElementById then your embed needs an id.
tim.
"MichaelF" <mf*******@MJFl anagan.com> wrote in message
news:44******** *************** **@posting.goog le.com...
> I've embedded a RealPlayer window in a page, and am unable to get
> mouse clicks. The clip plays, but clicks are ignored.
>
> I'm running IE5.5 on Win2k, with the following code:
>
> <embed name="RPEmbed" src="http://..." CONTROLS=ImageW indow
> AUTOSTART=true onLButtonUp="al ert('rpm');retu rn false;">
>
> I've also tried setting SetWantMouseEve nts(true), but to no avail:
>
> <SCRIPT language="JavaS cript">
> document.getEle mentById("RPEmb ed").SetWantMou seEvents(true);
> </SCRIPT>
>
> What am I missing? Is this even possible?
>
> Thanks.
>
> MichaelF