2 Replies Latest reply on Sep 29, 2008 7:12 AM by heath_huff

    Trouble launching a .wmv file from within RH7 .hhc

      I'm trying to launch/link to a .wmv file stored on a network resource from within my compiled help file (RH7 HTML) with little success.

      If I just add the file to a topic, RH will open Windows Media Player but not the movie. I looked through the forums for answers and located a couple of options--java script solutions to grab the local installation path, creating a <object></object> to shortcut to the movie--but neither worked out for me. They create shortcuts when the help file is compiled, but clicking these links or buttons either does nothing or results in an error. RH does not seem to be able to locate the movie.

      My latest attempt (discovered on MSDN):

      <SCRIPT Language="JScript">
      function parser(fn) {
      var X, Y, sl, a, ra, link;
      ra = /:/;
      a = location.href.search(ra);
      if (a == 2)
      X = 14;
      X = 7;
      sl = "\\";
      Y = location.href.lastIndexOf(sl) + 1;
      link = 'file:///' + location.href.substring(X, Y) + fn;
      location.href = link;

      This is the syntax for the link:

      <a onclick="parser('loremipsum.htm')" style="text-decoration: underline;
      color: green; cursor: hand">Link to loremipsum.htm</a>

      I added the above to my topic, compiled the help file, stored the .wmv file in the target directory, accessed the page in the TOC, and clicked the link. No dice. "Internet Explorer Cannot Display the Webpage" is the message I receive. According to MSDN, Windows Media Player should be opening the file.

      Any idea what I'm doing wrong? Anyone know an alternate solution?