how to get .mp3's to play on your page.

Discussion in 'Web Design and Development' started by Uselessdreamer1, Nov 10, 2006.

  1. Uselessdreamer1 macrumors member

    Joined:
    Oct 9, 2006
    Location:
    Kentucky
    #1
    hey guys im very new into making my own website and im just learing HTML. I eventually want a nice java webdesign. Everything is so confusing though!!! Anyway i was wondering if someone knew the code to get .mp3's to play with html. Ive read about midi's, but there gay.
     
  2. Uselessdreamer1 thread starter macrumors member

    Joined:
    Oct 9, 2006
    Location:
    Kentucky
    #3
    i think thats a link thing, like you click it and it plays. id like to have something playing while they are looking at my pictures. Thanks though!;)
     
  3. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #4
    If you put the embed / object code in the actual page that has the pictures, it's embedded within *that* page. It's only embedded within a pop-up window if you put it in a pop-up window. This is the code you want to use:

    Code:
        <object width="300" height="42">
        <param name="src" value="gtr.mp3">
        <param name="autoplay" value="true">
        <param name="controller" value="true">
        <param name="bgcolor" value="#FF9900">
        <embed src="gtr.mp3" autostart="true" loop="false" width="300" height="42" controller="true" bgcolor="#FF9900"></embed>
        </object>
    Just replace the "gtr.mp3" with the name of your song and put this code inside the webpage wherever within the webpage you want the controller to show up. I think if you use value="false" in the controller param tag and controller="false" in the embed tag, then you will not actually see the controller at all.
     
  4. stoid macrumors 601

    stoid

    Joined:
    Feb 17, 2002
    Location:
    So long, and thanks for all the fish!
    #5
    Are you suggesting that if MIDI files were to find other MIDI files of the same gender, that they would be attracted to them? Or more accurately, that MIDI files are happy? Why wouldn't you want to include 'happy' files on your webpage?

    Sorry, it bugs me when people misuse the word 'gay' to mean 'bad'.

    And for the sake of web users everywhere, please _please_ include an easy option to turn the music off, or better et, make the user click to hear the music, because there is nothing more irritating than having a page suddenly start blaring some song over whatever other sounds my comptuer is making that I want to hear.
     
  5. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #6
    True both of those things... with respect to the second one, yes, for that reason, you should be EXTREMELY sparing about turning the controller off in the embed tag. Leave it on and put it somewhere easy to find on the page. People who don't want to listen to your music will thank you.
     
  6. Uselessdreamer1 thread starter macrumors member

    Joined:
    Oct 9, 2006
    Location:
    Kentucky
    #7
    sorry about the gay comment its just habit, i know its wrong. when i put that code in the site theres a quicktime "Q" with a questionmark?


    FIXED!!!
     

Share This Page