From: Clay Benoit <[EMAIL PROTECTED]>
Subject: RE: DHTML Layer Problem in Netscape

Hey Charles -

Due to differences in the DOM between Netscape and IE,
you will need to reference the RealPlayer Object differently
for both browsers.

For Netscape, you can use the following syntax:

      document.realLayer.document.embeds["sample"].DoPlay()

It probably makes sense to write a small JavaScript function
to handle both browsers, rather than use the HREF.

function avcontrol (method) {
  if(method=="play") {
     if(nav) document.realLayer.document.embeds["sample"].DoPlay()
     else if(ie) document.all["sample"].DoPlay()
  }
  else if(method=="stop") {
     if(nav) document.realLayer.document.embeds["sample"].DoStop()
     else if(ie) document.all["sample"].DoStop()
  }
}

<td bgcolor="red">
   <A href="#" onClick=avcontrol('play')>Click here to play</A><br>
   <A href="#" onClick=avcontrol('stop')>Stop Playback</A>
</td>


Good luck.  Later.

Clay Benoit
Lead Developer - Midi, Inc.
[EMAIL PROTECTED]
http://www.midicorp.com


-----Original Message-----
From: RealForum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 16, 2000 4:27 PM
Subject: DHTML Layer Problem in Netscape


From: "Charles Walker" <[EMAIL PROTECTED]>
Subject: DHTML Layer Problem in Netscape

Hello,
I've searched the forum for three days and can't find a solution. I have an
embedded Real Video which is positioned above another layer. The bottom
layer contains the controls for the video, but I can't send the
methods(doPlay(), doStop()) in Netscape. I don't know if it is the
Javascript syntax or the layer definition. Works fine in IE. Here's the
code:

<BODY>
<div id="realLayer" style="HEIGHT: 144px; LEFT: 250px; POSITION: absolute;
TOP: 90px; VISIBILITY: visible; WIDTH: 176px; Z-INDEX: 20">
    <EMBED NAME="sample" SRC="http://208.206.43.184/test/ram/sample.rpm"
height="172" width="144" type="audio/x-pn-realaudio-plugin"
controls="ImageWindow" center="false" console="one"     autostart="false">
</div>
<p>&nbsp;</p>
<div id="redLayer" style="HEIGHT: 522px; POSITION: absolute; VISIBILITY:
visible; WIDTH: 695px; Z-INDEX: 19">
    <table width=695 height=522 cellpadding=0 cellspacing=0 border=0>
     <tr>
      <td bgcolor="red"><A href="#"
onmouseout=javascript:document.sample.DoPlay()>Click here to play</A><br>
      <A href="#" onmouseout=javascript:document.sample.DoStop()>Stop
Playback</A></td>
     </tr>
    </table>
</div>
</BODY>

Right now the red table is a placeholder for testing but it will contain a
Flash movie that will send commands control the Real Player in the upper
layer.

Thanks for any help.

Charles Walker



*******************************************************
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