SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php and embeded songs

    Can I use PHP to write an array like this for embeding rotating songs on a webpage. Here is what I have. I dont get any error messages yet the songs dont load when the page starts either.
    ##########################

    <?php
    $mp3samples = array
    ('<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...ersion=4,0,0,0" width=40 height=30 align="absmiddle">
    <param name=movie value="http://www.bluegrassmountain.com/tge/mp3/mp3ss100f.swf">
    <param name=quality value=best>
    <param name=wmode value=transparent>
    <param name=loop value=true>
    <embed src="http://www.bluegrassmountain.com/tge/mp3/mp3ss100f.swf" quality=best wmode=transparent loop=true type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash" align="absmiddle">
    </embed>
    </object>', '<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...ersion=4,0,0,0" width=40 height=30 align="absmiddle">
    <param name=movie value="http://www.bluegrassmountain.com/tge/mp3ss101f.swf">
    <param name=quality value=best>
    <param name=wmode value=transparent>
    <param name=loop value=true>
    <embed src="http://www.bluegrassmountain.com/tge/mp3ss101f.swf" quality=best wmode=transparent loop=true type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash" align="absmiddle">
    </embed>
    </object>',
    '<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...ersion=4,0,0,0" width=40 height=30 align="absmiddle">
    <param name=movie value="http://www.bluegrassmountain.com/tge/mp3ss102f.swf">
    <param name=quality value=best>
    <param name=wmode value=transparent>
    <param name=loop value=true>
    <embed src="http://www.bluegrassmountain.com/tge/mp3ss102f.swf" quality=best wmode=transparent loop=true type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash" align="absmiddle">
    </embed>
    </object>'); //song samples
    shuffle($mp3samples); //Give the array a shuffle
    ?>
    ######################################
    HTML

    <?php include('song_rotate.php') ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang=en><head>
    <title></title>
    </head>
    <body></body>
    </html>
    Pat

  2. #2
    SitePoint Addict devil cat's Avatar
    Join Date
    Apr 2003
    Location
    Reno
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't see where you are selecting a song or calling anything to happen when the page loads.

    You should look into the onLoad feature for the <body>

  3. #3
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks I will do some research on the onload feature. I have never used this feature yet so it is new territory for me.
    Pat


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
  •