Results 1 to 4 of 4

Thread: Need Juke Box script

  1. #1
    Join Date
    Jul 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Need Juke Box script

    I don't know much about this stuff...depend mostly on site builders...but I want to place a script on my page that will allow the viewer to choose which song they want to listen to without leaving the page. Can anyone help me?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Will this work for you?:
    Code:
    <html>
    <head>
    <title>Song Chooser</title>
    <script type="text/javascript">
    function changeMusic(song){
    document.getElementById('bg').innerHTML='<embed src="'+song+'" hidden="true"></embed>';
    }
    </script>
    </head>
    <body>
    <div id="bg"></div>
    <button onClick="changeMusic('song1.wav');">Song1</button>
    <button onClick="changeMusic('song2.wav');">Song2</button>
    <button onClick="changeMusic('song3.wav');">Song3</button>
    </body>
    </html>
    Change the songs source. Once you click, the song may take a while to load.
    Jeremy | jfein.net

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,998
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    12

    Default

    I like SoundManager2 for my sounds (either custom buttons that play whole songs or mouseovers that give mini sound effects - Great for gimmicks: see their "dont tease the chicken" toy on the homepage when you toggle the light in the top right corner) http://www.schillmania.com/projects/soundmanager2/

    Their "Make mp3 links playable in-place" demo sounds like what you need. http://www.schillmania.com/projects/...lay-mp3-links/
    Its so easy to implement - just look at the source code for help. The SoundManager2.js intercepts links to mp3 files so instead of downloading/opening Media Player they actually play "in-place" on the page. The top/basic example is just an unordered list of links to mp3s with CSS styling and a play button image to jazz them up.

    There are loads of other setup examples in the download zip too so even if this easy play "in-place" option is not your cup of tea, there should be something else that is.

    Bev

  4. #4
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    or you can just use Playlist.com they are really cool and you dont even need your own song urls just click add song to my playlist and it automatically updates the playlist on your page too! i use it and love it. here is an example ( www.modernrevolutions.net/playlist.php )

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •