Alternative to Embeds playing WAV in HTML ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Brooks

    #1

    Alternative to Embeds playing WAV in HTML ?

    IE5.5

    It's probably an oft repeated question but I have some code that used to
    work but does not now.

    This line in my Javascript code give an error now.

    document.embeds[Math.floor(Math .random()*6)].play();

    And the following are the six lines of WAV files that used to be played at
    random when a timed event happened.

    <embed src="ukatc32.wa v" width="1" height="1" autostart="fals e"
    hidden="true" />
    <embed src="ukatc41.wa v" width="1" height="1" autostart="fals e"
    hidden="true" />
    <embed src="ukatc42.wa v" width="1" height="1" autostart="fals e"
    hidden="true" />
    <embed src="ukatc90.wa v" width="1" height="1" autostart="fals e"
    hidden="true" />
    <embed src="ukatc92.wa v" width="1" height="1" autostart="fals e"
    hidden="true" />
    <embed src="ukatc93.wa v" width="1" height="1" autostart="fals e"
    hidden="true" />

    I've been looking for an alternative to 'embed' without the user having
    download yet another plugin, so what is the alternative ?

    Thanks,

    Richard Brooks.


  • Richard Cornford

    #2
    Re: Alternative to Embeds playing WAV in HTML ?

    Richard Brooks wrote:[color=blue]
    > IE5.5
    >
    > It's probably an oft repeated question but I have some code
    > that used to work but does not now.
    >
    > This line in my Javascript code give an error now.
    >
    > document.embeds[Math.floor(Math .random()*6)].play();[/color]
    <snip>

    if((document.em beds)&&
    (document.embed s.length >= 5)){
    var em = document.embeds[Math.floor(Math .random()*6)];
    em.volume = -1;
    em.play();
    }

    - Seems to work OK on IE 6.

    Richard.


    Comment

    • Richard Brooks

      #3
      Re: Alternative to Embeds playing WAV in HTML ?

      Richard Cornford wrote:[color=blue]
      > Richard Brooks wrote:[color=green]
      >> IE5.5
      >>
      >> It's probably an oft repeated question but I have some code
      >> that used to work but does not now.
      >>
      >> This line in my Javascript code give an error now.
      >>
      >> document.embeds[Math.floor(Math .random()*6)].play();
      >> <snip>[/color]
      >
      > if((document.em beds)&&
      > (document.embed s.length >= 5)){
      > var em = document.embeds[Math.floor(Math .random()*6)];
      > em.volume = -1;
      > em.play();
      > }
      >
      > - Seems to work OK on IE 6.
      >
      > Richard.[/color]

      I hate those strange things that happen! All I did was to archive the stuff
      to CDR then some months put it all back without changine version of IE and
      set the read only archive bit of the archived files to off just in case then
      it throws the error up only in that section.

      Thanks for having a look, Richard,


      Richard.


      Comment

      Working...