Menu

Can't embed player

Help
Josh
2007-12-11
2013-04-17
  • Josh

    Josh - 2007-12-11

    Hi all,

    I am having the hardest time embedding this. You can see the xspf generator and player working here: http://thestonewailer.com/music/music1/

    But when I try to copy the code to my main page, all I get is a blank square box (see www.thestonewailer.com).

    Anyone that can help me post this, I'd appreciate it. I'm going to attempt to paste the code below, but it might not appear correctly:

    <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /></head> <body> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="170" id="xspf_player" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="xspf_player.swf?playlist_url=playlist_generator.php&autoload=true&autoplay=true&shuffle=true" /> <param name="quality" value="high" /> <param name="bgcolor" value="#e6e6e6" /> <embed src="../xspf_player.swf?playlist_url=playlist_generator.php&autoload=true&autoplay=false&shuffle=true" quality="high" bgcolor="#e6e6e6" width="300" height="170" name="xspf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></body> </html>

     
    • sleen

      sleen - 2007-12-12

      Hi there Josh, take a look at the path to the swf player.  Where is the swf player on your site?  Looking above, the src="../xspf_player.swf statement is reaching one directory level higher than where the page is run from.  Since I packaged the pages, folders and script I can say it was originally designed to run from a directory down, like an mp3 folder, with a single swf for all folders.  To run it from your top level domain you have to change the html to not have '/..', and maybe point to wherever you are keeping the swf.

      Hope this helps,

      jonathan adams leonard

       
      • Josh

        Josh - 2007-12-12

        Hi Jonathan,

        I unzipped the package and saved it as normal. The player is in thestonewailer.com/music/music1/mp3.

        Does that help? How do I shuffle things around to get it to work on my main page?

        It works from here thestonewailer.com/music/music1 ...

        Thanks,
        Josh

         
    • Lewis Smith

      Lewis Smith - 2007-12-12

      Josh

      To use the player at the top level of the site you need to remove the ../ from wherever you see it.  As it stands the player will work in some browsers but not in others.

      Thanks

      Lewis

       
    • cal fellows

      cal fellows - 2008-02-19

      Just adjust the size and use mine,
      PASTED BELOW: THIS IS A SMALL
      180w X 100h PLAYER FOR LEFT/RIGHT COLUMN
      ################################

      <div style="text-align:center;">
      <div style="margin:0 auto;margin-bottom:5px;padding:0;padding-bottom:2px;width:180px;text-align:center;background-color:#666666;">

      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="180" height="110">

      <param name="wmode" value="transparent"/>
      <param name="movie" value="http://yourdomain.com/music/xspf_player.swf?playlist_url=http://yourdomain.com/music/playlist-sm1.xspf&amp;autoload=true&amp;autoplay=true&amp;repeat_playlist=true"/>
      <param name="player_title" value=""/>
      <param name="info_button_text" value=""/>
      <param name="allowScriptAccess" value=""/>
      <param name="quality" value="high"/>
      <param name="bgcolor" value=""/>

      <embed src="http://yourdomain.com/music/xspf_player.swf?playlist_url=http://yourdomain.com/music/playlist-sm1.xspf&amp;autoload=true&amp;autoplay=true&amp;repeat_playlist=true"
      wmode="transparent"
      quality="high"
      bgcolor=""
      name="xspf_player"
      allowscriptaccess=""
      info_button_text=""
      player_title=""
      type="application/x-shockwave-flash"
      pluginspage="http://www.macromedia.com/go/getflashplayer"
      align="center"
      width="180"
      height="110">
      </embed>
      </object>

      <!-- TINY POPUP REQUIRES EMBED tag in php file PLUS popup JAVASCRIPT (SEE BELOW) -->
      <a href="javascript:NewWindow('../static/xspf-standalone.php','acepopup','180','110','center','front');" style="display:block;margin:0;padding:0;border:none;line-height:1em;font-size:75%;text-align:center;color:white;">&raquo; Launch Standalone</a>

      </div>
      </div>

      ###########################################################
      SAVE CODE BELOW AS newwindow.js and put linkref in head tag
      ###########################################################

      // JavaScript Document

      <!--
      /****************************************************
           AUTHOR: WWW.CGISCRIPT.NET, LLC
           URL: http://www.cgiscript.net
           Use the code for FREE but leave this message intact.
           Download your FREE CGI/Perl Scripts today!
           ( http://www.cgiscript.net/scripts.htm )
      ****************************************************/
      var win=null;
      function NewWindow(mypage,myname,w,h,pos,infocus){
      if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
      if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
      else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
      settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win=window.open(mypage,myname,settings);
      win.focus();}
      // -->

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.