Forums

Putting flash mp3 player in a blog post. (15 posts)

  1. jtp199
    Member
    Posted 2 years ago #

    So i have a problem where i found a nice simple mp3 player that can play multiple files and it works perfectly fine until i put it in a blog post. I have tried very many different ways to get this working. I got the player to show up at least but it will not load the XML now i am not sure if this is my fault or what.
    This is where i got the player as well. http://www.premiumbeat.com/flash_resources/free_flash_music_player/multiple_tracks_mp3_player_menu.php

    This is the code i had to put in.

    <script type="text/javascript" src="swfobject.js"></script>
    
    <div id="flashPlayer">
      This text will be replaced by the flash music player.
    </div>
    
    <script type="text/javascript">
       var so = new SWFObject("playerMultipleList.swf", "mymovie", "295", "200", "7", "#FFFFFF");
       so.addVariable("autoPlay","no")
       so.addVariable("playlistPath","playlist.xml")
       so.write("flashPlayer");
    </script>

    And this is what i changed to make it show up in my blog post at least.

    <script type="text/javascript" src="http://www.dotherevolution.org/music/faith+hope+love/swfobject.js"></script>
    
    <div id="flashPlayer">
    </div>
    
    <script type="text/javascript">
       var so = new SWFObject("http://www.dotherevolution.org/music/faith+hope+love/playerMultipleList.swf", "mymovie", "295", "200", "7", "#FFFFFF");
       so.addVariable("autoPlay","no")
       so.addVariable("playlistPath","http://www.dotherevolution.org/music/faith+hope+love/playlist.xml")
       so.write("flashPlayer");
    </script>

    If you can please help me! I really want to figure this out.
    Thank you in advanced :)

  2. elcarpo
    Member
    Posted 2 years ago #

    i think that you can't execute an script on a post...

    player seems to be a version of this one

    http://www.longtailvideo.com/

    try using an "embed" code, instead of a script code, you can find it on http://www.longtailvideo.com/support/jw-player-setup-wizard

    or, you can try using a wordpress plugin like http://wordpress.org/extend/plugins/wordtube/

    good luck!

  3. jtp199
    Member
    Posted 2 years ago #

    well thats the thing though i have tried embedding it but that didnt load the xml playlist. So its the playlist that is my problem so idk why its not working its kinda making me mad :(

  4. elcarpo
    Member
    Posted 2 years ago #

    but you are not "embbeding" it...

    your code should look something like this

    <embed
      src="http://www.dotherevolution.org/music/faith+hope+love/playerMultipleList.swf"
      width="470"
      height="470"
      bgcolor="#"
      allowscriptaccess="always"
      allowfullscreen="true"
      flashvars="file=http://www.dotherevolution.org/music/faith+hope+love/playlist.xml&playlist=bottom"
    />

    i'm not saying it WILL work, but give it a try

  5. elcarpo
    Member
    Posted 2 years ago #

    that code, i think, should work with the longtail player....

  6. jtp199
    Member
    Posted 2 years ago #

    well it gets embeded but not everything works.
    Some of the code goes into the post.

    width="470"
    height="470"
    bgcolor="#"
    allowscriptaccess="always"
    allowfullscreen="true"
    flashvars="file=http://www.dotherevolution.org/music/faith+hope+love/playlist.xml&playlist=bottom"
    />
  7. elcarpo
    Member
    Posted 2 years ago #

    are you posting it with the html editor?

  8. elcarpo
    Member
    Posted 2 years ago #

    http://www.tp1.com.ar/pruebas/test22/

    you can see the player, i think that the xml with the playlist needs the complete url to each song...

  9. jtp199
    Member
    Posted 2 years ago #

    yeah thats exactly whats happening. And yes I am in the html editor lol.

  10. elcarpo
    Member
    Posted 2 years ago #

    i really think that you should try using this instead

    http://wordpress.org/extend/plugins/wordtube/

    it will let you create a playlist easily...

  11. jtp199
    Member
    Posted 2 years ago #

    Alright downloading it! I'll test it out when i get back this should work perfectly fine. Thanks!

  12. jtp199
    Member
    Posted 2 years ago #

    It works BEAUTIFULLY! Thanks for the help man!

  13. jtp199
    Member
    Posted 2 years ago #

    Just found a problem :( it interferes with my featured content gallery the only thing it messes with is the bottom text which i mean isnt bad so its fine

  14. tnorberg
    Member
    Posted 2 years ago #

    You could always try my plugin? It uses the premiumbeat.com player.

    My site

    WordPress.org

  15. ReelVisits
    Member
    Posted 2 years ago #

    This works for videos. Might work for mp3s.

    function getCustomField()
    {
    	global $post;
    
    	$video = js_escape(get_post_meta($post->ID, 'video', true));
    	$vid_place = js_escape(wp_get_attachment_url($video));
    
    		if($video) : ?>
    
    <script type='text/javascript' src='http://actual/path/to/swfobject.js'></script>
    <p><div id='<?php echo $video;?>'>This text will be replaced</div></p>
    <script type='text/javascript'>
      var so = new SWFObject('http://actual/path/to/player.swf','ply','470','320','9','#ffffff');
      so.addParam('allowfullscreen','true');
      so.addParam('allowscriptaccess','always');
      so.addParam('wmode','transparent');
      so.addVariable('file','<?php echo $vid_place;?>');
      so.write('<?php echo $video;?>');
    </script>
    <?php
    
    endif;
    
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.