sound

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rose-Marie

    sound

    When a particular function is called by any other function, I would like to include in this particular function a means of playing a 2 second *.wav file.

    The actual program can be found at:



    and the sound is to be produced in the function display(), whenever the player gives an icorrect answer.

    I would be pleased if anyone could show me how to do this.

    Rose-Marie

  • Lee

    #2
    Re: sound

    Rose-Marie said:[color=blue]
    >
    >This is a multi-part message in MIME format.[/color]

    Please post only plain text to this newsgroup.
    Thanks

    Comment

    • Randy Webb

      #3
      Re: sound

      Rose-Marie wrote:[color=blue]
      > When a particular function is called by any other function, I would
      > like to include in this particular function a means of playing a 2
      > second *.wav file.[/color]

      You can't reliably do that.
      [color=blue]
      >
      > The actual program can be found at:
      >
      > http://www3.sympatico.ca/rfournier/KingsOfEngland.htm
      >
      > and the sound is to be produced in the function display(),
      > whenever the player gives an icorrect answer.
      >
      > I would be pleased if anyone could show me how to do this.[/color]

      Since many people surf with sound turned off, or, lack sound capability
      to start with, you can't reliably do it, and definitely not cross-browser.

      But try invoking the play() and stop() on an embed tag. Or, write an
      embed tag to a div using innerHTML. Consult the FAQ

      --
      Randy
      comp.lang.javas cript FAQ - http://jibbering.com/faq

      Comment

      Working...