From: Dwight Owens <[EMAIL PROTECTED]>
Subject: RE: Acessing embedded plugin within a DIV
Thanks for the help, Clay.
As it turns out, I finally got the syntax right, but it still wouldn't
work for me after many frustrating hours of twiddling. Eventually, I
decided to retype the exact same code line-by-line, and voila, it worked!
I suspect some sort of hidden corruption in my file. Anyway, here is what
I use for NS:
document.<name of my embed layer>.document.embeds[0].<realPlayer command>
Here is what I use for IE:
document.all.<name of the first control console in my embed>.<realPlayer
command>
Here is the playclip function:
function playClip(clipName) {
if(is.ns4) {
document.embedLayer.document.embeds[0].DoStop();
document.embedLayer.document.embeds[0].SetSource(clipName);
setTimeout('document.embedLayer.document.embeds[0].DoPlayPause();', 2000);
} else {
document.all.realPlug.DoStop();
document.all.realPlug.SetSource(clipName);
setTimeout('document.all.realPlug.DoPlayPause();', 2500);
}
}
BTW, this code was adapted from the format used by Barry McCarthy, who is
a netscape.devs-javascript newsgroup participant.
One thing I discovered is that I could not give names to both of my
consoles (I have a ControlPanel and a StatusBar), so I named the first and
removed the name of the second:
<EMBED name="realPlug" SRC="" TYPE="audio/x-pn-realaudio-plugin"
CONSOLE=clip1 CONTROLS=ControlPanel HEIGHT=28 WIDTH=290 AUTOSTART=false>
<EMBED SRC="" TYPE="audio/x-pn-realaudio-plugin" CONSOLE=clip1
CONTROLS=StatusBar HEIGHT=28 WIDTH=290 AUTOSTART=false>
Then it was happy in IE.
-Dwight Owens,
Instructional Designer
University Corporation for Atmospheric Research,
Boulder CO USA
On Tue, 3 Aug 1999, Clay Benoit wrote:
> Dwight-
>
> In IE, I use document.all.myEmbed.realPlayerCommand.
>
> However, I use the "embeds" array in NN to target a RealPlayer in a layer.
>
> Try using the syntax : document.myLayer.embeds["myEmbed"].realPlayerCommand
>
> Later.
>
> Clay Benoit