CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2005
    Posts
    6

    Javascript music on my blog.

    Hello. Can you please help me out? I need some help with my music player. It's not working on my blog. I think the code is messed up.

    http://niteice.hopto.org/~dposse/html777.txt

    If you can take a look at the code and tell me why it's messed up, that would be great. Thank you.

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Javascript music on my blog.

    Your link is a text file and it does not work.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Nov 2005
    Posts
    6

    Re: Javascript music on my blog.

    Oh, i'm sorry. I uploaded the file as an attachment.
    Attached Files Attached Files

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: Javascript music on my blog.

    Well, first off the font name is "Trebuchet" and not "Trebushet". This could cause some style-sheet errors.

    Second, you are using ActiveX which is not highly recommended. Not all browsers will accept the ActiveX. As well, the <EMBED> tag is not accepted among many clients as well.

    If you are going to do music, the best way is Flash. It is faster and easier for others to deal with it. Here is a good example.

    To be honest, music in general on webpages is considered to be an annoyance. Most professional sites do their best to stay away from it. Don't get me wrong, I am not telling you what to do, I am just telling you what I know.
    Last edited by peejavery; November 11th, 2005 at 05:23 PM.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Nov 2005
    Posts
    6

    Re: Javascript music on my blog.

    Ah, thanks. The reason why i want to use the player i have now is because it loads extremely fast on my site. Flash doesn't. It might be better for others, but i don't think so. But i will try it out. Is there anything to use besides ActiveX? Is the misspelling the only thing that is causing the player to malfunction?

  6. #6
    Join Date
    May 2002
    Posts
    10,943

    Re: Javascript music on my blog.

    The mispelling should be causing a the malfunction of coding. That would just affect the way your website looks concerning fonts.

    Unfortunately the only way to make sound compatible for all types of browsers is using Flash. The <EMBED> tag is well liked in Internet Explorer but not compatible with FireFox. To be honest, I have never seen ActiveX used in making a media player before. It is intriguing but I am sure that it is also a security risk. Most ActiveX is a risk, just not all are exploited.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  7. #7
    Join Date
    Nov 2005
    Posts
    6

    Re: Javascript music on my blog.

    And to be honest with you, i went source diving and found that on another blog. So i know that it works. I downloaded the flash player infomation. I'm taking a look at it now. I hope it's not too hard to put together. I've never messed with flash coding before.

  8. #8
    Join Date
    May 2002
    Posts
    10,943

    Re: Javascript music on my blog.

    On the contrary, it is rather simple.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  9. #9
    Join Date
    Nov 2005
    Posts
    6

    Re: Javascript music on my blog.

    alright. I got the musical part of the flash player set up. I'm now confused about the next set of directions...

    "after saving and closing the mp3player.xml file, you can copy everything to your
    website. put it all into the same directory as your html page. then copy-paste this
    code to your html page on the place you want the mp3player to appear:

    <object type="application/x-shockwave-flash" data="mp3player.swf"
    width="280" height="280" wmode="transparent">
    <param name="movie" value="mp3player.swf" />
    <param name="wmode" value="transparent" />
    </object>"

    EDIT: Hmm. It doesn't seem that it can work on the blog im using. It's a hosted blog....
    Last edited by dposse; November 11th, 2005 at 08:19 PM.

  10. #10
    Join Date
    May 2002
    Posts
    10,943

    Re: Javascript music on my blog.

    It works perfectly fine for me.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  11. #11
    Join Date
    Nov 2005
    Posts
    6

    Re: Javascript music on my blog.

    I have this XML code:

    <?xml version="1.0" encoding="UTF-8"?>
    <player showDisplay="yes" showPlaylist="no" autoStart="random">
    <song path="http://niteice.hopto.org/~dposse/Nirvana - 18 - They Hung Him on a Cross (Demo, 1989).mp3" title="They hung him on a cross" />
    <song path="http://niteice.hopto.org/~dposse/the_pillows-ride_on_shooting_star.mp3" title="Ride on Shooting Star" />
    <song path="http://niteice.hopto.org/~dposse/Duvet.mp3" title="Duvet" />
    <song path="http://niteice.hopto.org/~dposse/04 War Pigs.mp3" title="War Pigs" />
    <song path="http://www.andrew.cmu.edu/~echen1/Final%20Fantasy%20X.mp3" title="X Theme" />
    <song path="http://niteice.hopto.org/~dposse/04 Sunshine of Your Love.mp3" title="Sunshine of your Love" />
    <song path="http://niteice.hopto.org/~dposse/02 Bohemian Rhapsody.mp3" title="Bohemian Rhapsody" />
    <song path="http://animeadrenaline.bl5.net/Jin-Roh%20-%20Frangance%20Rain.mp3" title="Frangance Rain" />
    <song path="http://animeadrenaline.bl5.net/Gundam%20Wing%20-%20White%20Reflection.mp3" title="White Reflection"/>
    </player>

    then i have this other code:

    <object type="application/x-shockwave-flash" data="mp3player.swf"
    width="280" height="280" wmode="transparent">
    <param name="movie" value="mp3player.swf" />
    <param name="wmode" value="transparent" />
    </object>


    what do i do?

  12. #12
    Join Date
    May 2002
    Posts
    10,943

    Re: Javascript music on my blog.

    I would suggest getting rid of the base location and just post the actual MP3 filename. Now put the flash files and xml in the same folder as the music. Just tell the HTML to look to that.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured