Need Parameters for a "Stop All Sound" button

Discussion in 'Java' started by pureevilentertainment@gmail.com, Sep 6, 2008.

  1. Guest

    Hi All,

    I've created a webpage with various buttons that each play a different
    sound file located on my local drive. I need a button that will stop
    any sound that is currently playing.

    Here is an example of the code:
    <applet code="fphover.class" codebase="./" width="104" height="24">
    <param name="color" value="#000080">
    <param name="hovercolor" value="#0000FF">
    <param name="textcolor" value="#FFFFFF">
    <param name="bgcolor" value="#000000">
    <param name="effect" value="fill">
    <param name="text" value="Ref Whistle">
    <param name="sound" valuetype="ref" value="1Sound%20FX%20-%20Ref
    %20whistle.au">
    </applet></p>

    Now keep in mind there are a couple dozen of these batches in the html
    page. I cannot figure out how to make one simple button that I can
    click to make any active sound file to stop.

    Thanks!

    Paul
     
    , Sep 6, 2008
    #1
    1. Advertising

  2. On Sep 6, 4:09 pm, wrote:
    >..
    > I've created a webpage with various buttons that each play a different
    > sound file located on my local drive. I need a button that will stop
    > any sound that is currently playing.
    >
    > Here is an example of the code:
    > <applet code="fphover.class" ..

    ....
    > ..there are a couple dozen of these batches in the html
    > page. I cannot figure out how to make one simple button that I can
    > click to make any active sound file to stop.


    When the stop button is pressed, call
    AppletContext.getApplets() and enumerate
    the elements looking for instances of the
    fphover applet class. When you find one,
    call the FPHover.stopAllClips() method
    (which you will need to code).

    --
    Andrew Thompson
    http://pscode.org/
     
    Andrew Thompson, Sep 6, 2008
    #2
    1. Advertising

  3. Guest

    On Sep 5, 11:59 pm, Andrew Thompson <> wrote:
    > On Sep 6, 4:09 pm, wrote:
    >
    > >..
    > > I've created a webpage with various buttons that each play a different
    > > sound file located on my local drive. I need a button that will stop
    > > any sound that is currently playing.

    >
    > > Here is an example of the code:
    > > <applet code="fphover.class" ..

    > ...
    > > ..there are a couple dozen of these batches in the html
    > > page. I cannot figure out how to make one simple button that I can
    > > click to make any active sound file to stop.

    >
    > When the stop button is pressed, call
    > AppletContext.getApplets() and enumerate
    > the elements looking for instances of the
    > fphover applet class. When you find one,
    > call the FPHover.stopAllClips() method
    > (which you will need to code).
    >
    > --
    > Andrew Thompsonhttp://pscode.org/


    I have no idea what any of that means. Sorry. I'm new at this. To
    elaborate more... I've made a sound board for an internet radio show,
    so that I can play sound effects by clicking on buttons I've made
    within Frontpage. My problem is that sometimes I want the clips to
    stop playing before their file is done.

    Is there any simple code that I can use, with a button, that will
    immediately stop any sound playing within the page?

    Thanks and again, sorry for being such a green-thumb.

    Paul
     
    , Sep 6, 2008
    #3
  4. On Sep 6, 5:24 pm, wrote:
    ....
    > Is there any simple code that I can use, with a button, that will
    > immediately stop any sound playing within the page?


    No. I suggest you hire a Java programmer.

    --
    Andrew Thompson
    http://pscode.org/
     
    Andrew Thompson, Sep 6, 2008
    #4
  5. Roedy Green Guest

    On Fri, 5 Sep 2008 23:59:46 -0700 (PDT), Andrew Thompson
    <> wrote, quoted or indirectly quoted someone
    who said :

    >When the stop button is pressed, call
    >AppletContext.getApplets() and enumerate
    >the elements looking for instances of the
    >fphover applet class. When you find one,
    >call the FPHover.stopAllClips() method
    >(which you will need to code).


    Of course that won't necessarily stop sound generated the various
    other ways. See http://mindprod.com/jgloss/sound.html

    You might be able to do a platform-dependent way by finding something
    low level to abort all access to the sound card. That would require
    some JNI.
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Sep 7, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonck van der Kogel
    Replies:
    2
    Views:
    988
    Jonck van der Kogel
    May 27, 2004
  2. Jason
    Replies:
    2
    Views:
    523
    Jonathan Mcdougall
    May 13, 2006
  3. mik
    Replies:
    1
    Views:
    240
  4. kito
    Replies:
    2
    Views:
    420
  5. Florian Loitsch
    Replies:
    11
    Views:
    253
    Michael Winter
    Mar 15, 2005
Loading...

Share This Page