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 8 of 8

Thread: mp3's-play file

  1. #1
    New Coder
    Join Date
    Feb 2003
    Location
    dudley west mids uk
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mp3's-play file

    how do you get an mp3 to only play when the link has been clicked, and also have a seperate link for downloading. mO
    HASAAKI v.2.0 now up come and visit us at http://www.online-addicts.com/~joehall

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Provo, UT
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    To have the MP3 play when you click a link you would or could have a seperate html file that has the mp3 embeded in it and the link would go to the page. then to have the a link to download the song you just link directly to the mp3 file.

    so

    <a href="mymp3html.htm">

    and

    <a href="mymp3.mp3">

    That is the simplist way to do it. There are more elaborate ways for sure. Happy Coding.

    Michael
    I try to convince 'em that I am computer geek, but I just can't do it. Why? Oh why?

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    New Zealand
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you wanted a bit more control you could investigate using Flash (I have found it to be the most practical for this kind of thing).

    It will enable you to control streaming or preloading, volume, etc. You can probably find pre-built jukebox systems at www.flashkit.com if you don't want to build it yourself.

    Just for interest, instead of a fully Flash interace, Flash files can also be controlled by javascript so you can have a regular <a> link that will set off an embedded flash movie in the page (will save loading a new page).
    eTheory - the theory of revolution

  • #4
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do you?

    I have follwed your instructions and it works, thank you,
    but I would like to have a picture of the artist in view while
    the song is playing. How do I do that?

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Location
    A 4D universe
    Posts
    1,337
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If your using flash that is simple as a motion tween

    Just stick your persons image next to the page with a file.

    Same with HTML too, mind you, I would embed the music into a page that is to play something. Simply using a href tags, can make some browsers download the instead.

    Have a peep at www.w3.org for more information on embedding objects into your page.



    Have fun!
    http://www.mudsplat.com - Web design, print, and marketing solutions.

  • #6
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you

    I don't quite understand a sample of code would help. here is what I am currently doing.

    <BODY><IMG SRC="/images/toya/Toya.jpg" WIDTH="640" HEIGHT="369" BORDER="0">
    <BR><BR>
    <P ALIGN="LEFT">Listen to Toya's smash hit I Do<A
    HREF="realaudio/toya.mp3"> Click Here </A> </P> </BODY>

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can make streaming meta files for mp3 just like you can for real audio - you link to a file called "mysong.m3u" which is a text-file containing a fully-qualified URI for the actual mp3 file; in most cases that will start the default mp3 handling application and open a stream, or open up IE6's media sidebar, or whatever.

    I do this on my music section and it seems to work. You can make separate download links using PHP, like this thread.
    Last edited by brothercake; 03-29-2003 at 02:04 AM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #8
    Senior Coder
    Join Date
    Aug 2002
    Location
    A 4D universe
    Posts
    1,337
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have a look at Helix Player - I think it does what you are looking for.


    http://www.realnetworks.com
    http://www.mudsplat.com - Web design, print, and marketing solutions.


  •  

    Posting Permissions

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