Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    embed music w/playlist

    hi...
    how can i embed music that have playlist of the song for the viewer to click then play.

    plzz.. need a sample code..

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Try this thread.

    Dan

  • #3
    New to the CF scene
    Join Date
    Nov 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanx for the codes, but how about if when they open the page it will automatic play then when if they want to chose they will click the option song & the current song will stop.

    thax a lot..

    i hope u can help me again.


  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    That code is there too. Its just a matter of reading the thread.

  • #5
    New to the CF scene
    Join Date
    Nov 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanx

    hi Aerospace thanx for the code but can u convert this code that you made to CSS form?



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Random mp3 Music Player</title>
    <style type="text/css">
    <!--
    #jukebox {
    text-align:center;
    }
    -->
    </style>
    <script type="text/javascript">
    <!--
    nummp3 = 5
    day = new Date()
    z = day.getTime()
    y = (z - (parseInt(z/1000,10) * 1000))/10
    x = parseInt(y/100*nummp3,10) + 1
    if (x == (1))
    mp3=("http://nesvinz.bravehost.com/music/Lintik.wav")
    if (x == (2))
    mp3=("http://nesvinz.bravehost.com/music/Ngayong%20gabi.wav")
    if (x == (3))
    mp3=("http://nesvinz.bravehost.com/music/Rivermaya%20-%20Makaaasa%20ka.wav")
    if (x == (4))
    mp3=("http://nesvinz.bravehost.com/music/06%20-%20Track.wav")
    if (x == (5))
    mp3=("http://nesvinz.bravehost.com/music/WO62CF~1.wav")
    function song(){
    document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='MediaPlayer1' width='300' height='69' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
    }
    //-->
    </script>
    </head>

    <body>
    <div id="jukebox">JUKEBOX<br><br>
    <select id="cancion" onchange="song()" size="1">
    <option value="none">::::::::::::: Choose Your Song Here :::::::::::::</option>
    <option value="http://nesvinz.bravehost.com/music/Lintik.wav">Lintik</option>
    <option value="http://nesvinz.bravehost.com/music/Ngayong%20gabi.wav">NgaYonG GaBi</option>
    <option value="http://nesvinz.bravehost.com/music/Rivermaya%20-%20Makaaasa%20ka.wav">MaKaasa Ka</option>
    <option value="http://nesvinz.bravehost.com/music/06%20-%20Track.wav">fAlleN</option>
    <option value="http://nesvinz.bravehost.com/music/WO62CF~1.wav">WolfGanG</option>
    </select><br><br>
    <span id="music1">
    <script type="text/javascript">
    <!--
    document.write('<embed type="application/x-mplayer2" '
    +'pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" '
    +'src="'+mp3+'" '
    +'name="MediaPlayer1" '
    +'width="300" '
    +'height="69" '
    +'controltype="2" '
    +'showcontrols="1" '
    +'showstatusbar="1" '
    +'autostart="true">'
    +'</embed>');
    //-->
    </script>
    </span>
    </div>
    </body>
    </html>


    thanx again

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    What do you mean by CSS form? I'm guessing you are trying to use the code on a place like myspace and it won't let you because of the javascript. This can't be done, I think you should try to understand the basics of html before you try to take on too much.


  •  

    Posting Permissions

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