Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Need Parameters for a "Stop All Sound" button (http://www.velocityreviews.com/forums/t633961-need-parameters-for-a-stop-all-sound-button.html)

pureevilentertainment@gmail.com 09-06-2008 06:09 AM

Need Parameters for a "Stop All Sound" button
 
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

Andrew Thompson 09-06-2008 06:59 AM

Re: Need Parameters for a "Stop All Sound" button
 
On Sep 6, 4:09*pm, pureevilentertainm...@gmail.com 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/

pureevilentertainment@gmail.com 09-06-2008 07:24 AM

Re: Need Parameters for a "Stop All Sound" button
 
On Sep 5, 11:59 pm, Andrew Thompson <andrewtho...@gmail.com> wrote:
> On Sep 6, 4:09 pm, pureevilentertainm...@gmail.com 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

Andrew Thompson 09-06-2008 07:45 AM

Re: Need Parameters for a "Stop All Sound" button
 
On Sep 6, 5:24*pm, pureevilentertainm...@gmail.com 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/

Roedy Green 09-07-2008 06:29 PM

Re: Need Parameters for a "Stop All Sound" button
 
On Fri, 5 Sep 2008 23:59:46 -0700 (PDT), Andrew Thompson
<andrewthommo@gmail.com> 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


All times are GMT. The time now is 06:47 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57