From: Gilbert_Gelinas <[EMAIL PROTECTED]>
Subject: Re: hiding an embedded video once it stopped

     Thanks to everyone who helped me (especialy Peter Rose who put me on the
right track). Since this question has been raised before and it's a cool
trick, here's a snippet of code that finally works for me (in a PC
environment).
The javascript goes:

function cacher()
{
  if(document.layers)
    if(document.video.document.embeds[0].GetPlayState()!=0)
     setTimeout("cacher()", 1);
    else
     document.video.visibility="hidden";
   else
   if(cat.GetPlayState()!=0)
     setTimeout("cacher()", 1);
    else
     video.style.visibility="hidden"
}

the body's onLoad event is set to "setTimeout('cacher()', 32200)" and it
refers to:

<DIV ID="video" STYLE="position: absolute; top: 0pt; align: right; width:
176px">
  <EMBED ID="cat" SRC="cd.rpm" WIDTH=176 HEIGHT=144 CONTROLS=ImageWindow
CONSOLE=cd AUTOSTART=true>
   <EMBED SRC="cd.rpm" WIDTH=176 HEIGHT=44 CONTROLS=InfoPanel CONSOLE=cd>
</DIV>

A few notes:

1- To my surprise, the video can play hidden, as I learned accidently
through my ordeal. That is, you hear the sound though the layer is hidden.
Of course, it's hard to see a point to that.

2- For reasons beyond me, the "align: right" style property of the layer
doesnt work under IE5. Also, if I give it a height, any height of any kind,
under any browser, the InfoPanel is displayed to the right of the
ImageWindow with what seems to be a baseline alignment.

Gilbert G�linas


Please check out the new RealForum Bulletin Board at 
http://realforum.real.com/cgi-bin/realforum/wwwthreads.pl

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