Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Reaped: SOUND

by NodeReaper (Curate)
on May 07, 2001 at 05:24 UTC ( [id://78420]=perlquestion: print w/replies, xml ) Need Help??

NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: SOUND
by Sinister (Friar) on May 07, 2001 at 10:13 UTC
    I think this can't realy be done with perl. It is browser specific and to control your browser, you might want to use JavaScript. Or create a website completely build up with Flash. It supports forms as well...

    Sinister greetings.
Re: SOUND
by ozzy (Sexton) on May 07, 2001 at 21:26 UTC
    I recently read an article on JS Sound. I hope this can be of some help.

    -= Ozzy =-
Re: SOUND
by alfie (Pilgrim) on May 07, 2001 at 15:32 UTC
    Clicking a link does happen on the browser-side - and perl can't be used there (at least no version that I know of ;) So Sinister is right.

    But I doubt that you can start a sound when clicking on a link. Playing a sound is a page-specific thing that is just done while a page is displayed - not when it changes. To say it in other words: If you really want to do it that way the user will have to wait until your sound stopped before the next page will be loaded. I don't think that this is very userfriendly, so try to avoid it.

    Conclusion: This in nothing perl-related - get yourself a good JavaScript documentation.
    --
    use signature; signature(" So long\nAlfie");

      But I doubt that you can start a sound when clicking on a link.

      Sure you can :) You just specify a JavaScript function as the OnSubmit action for the form, or as the HREF of the link. The function first launches the sound in a new window, then submits the form or returns the location for the link. Of course, by the time the sound loads and then the plugin to handle it loads and starts playing, the form may already be fully submitted...

      --isotope
      http://www.skylab.org/~isotope/
naughty
by thpfft (Chaplain) on May 07, 2001 at 22:20 UTC

    It's pretty easy to do, but it definitely isn't a perl question...

    it depends on the sort of sound you want to play. if it's a stream of some sort then you will need to read up on the javascript interface offered by the plugin which is playing it. they're usually pretty simple.

    if it's just a ping or beep or something then it's simpler. i haven't done it for a while, but i remember netscape used to have a built-in plugin for midi and wav files, and i expect something similar is still true. All you need is the embedding syntax - which is simple - and the right javascript call. document.embeds[0].doPlay() is likely, but i can't remember.

    suggest you try devedge or (sorry) msdn.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://78420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 22:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found