SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot beyre's Avatar
    Join Date
    Dec 2008
    Location
    North Carolina
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can't get player to show

    Note: I had this post up in the Audio section of this forum, but it doesn't seem to be any active part of the forum ... and then again, this is more of a coding problem than a problem with the player itself ... hence why I put the post here also ....

    I am a bit perplexed as to why the player is not showing on the page I have setup:

    http://www. thenoteablesdancecombo. com/demo-temp.html
    It's supposed to be in that blank spot to the right. The page validates with no errors.

    The example pages that come with the player play the songs and show just fine here:
    http://www. thenoteablesdancecombo. com/example_nobius.html
    All I did was copy that code into the <td> on the demo-temp.html page and put the necessary javascript mentions in the head of the page.

    So, if it works on one page, why not the other? All the necessary files are uploaded, otherwise that example page wouldn't work. The home page for the player on e-phonic's website had also put their player in a table, so that can't be the problem.

    Why am I missing that is painfully obvious, but I can't see?

    Here is the player's documentation:
    http://www.e-phonic.com/mp3player/documentation/

    I've been working on this for over 2 hours. I can't see what is wrong.
    Any help you can provide would be greatly appreciated.

    ~ Barb
    Barbara E.

    Will add my site links when I'm more established here.

  2. #2
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    589
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The player works and so are your paths

    http://www.thenoteablesdancecombo.com/ep_player.swf

    The flash holder div should go first before the java stuff... well at least thats how I embed my swf with swf object. Give it a try and let us know

    Code HTML4Strict:
    <div id="flashcontent"></div>
    <script type="text/javascript">
    		// <![CDATA[
     
    		var so = new SWFObject("ep_player.swf", "ep_player", "269", "226", "9", "#FFFFFF");
    		so.addVariable("skin", "skins/nobius_blue/skin.xml");
    		so.addVariable("playlist", "playlist.xml");
    		so.addVariable("autoplay", "false");
    		so.addVariable("shuffle", "false");
    		so.addVariable("repeat", "false");
    		so.addVariable("buffertime", "1");
    		so.addParam("allowscriptaccess", "always");
    		so.write("flashcontent");
     
    		// ]]>
    	</script>
    Don't Panic

  3. #3
    SitePoint Zealot beyre's Avatar
    Join Date
    Dec 2008
    Location
    North Carolina
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heya Stonedeft,

    Thanks for helping out.

    Well, I tried it a few different ways ... with and without the <div> tag altogether and the </div> tag before and after the player.

    It's either I can have the text or I can have the player ... but not both.

    I also am not sure where the id in the <div> is being pulled from as there is no CSS with the player files ... and I didn't add that myself.

    Back to fiddling ...

    Edited: Just noticed that if I delete the whole div section with the 2 links ... the player doesn't show at all. It seems that the player is dependent on the <div> and the <div> has to be before the player. But why can't I get the text to show when before the player? If I place the <div> after the player, the text shows just fine ... but not the player itself. *bangs head on desk*
    Barbara E.

    Will add my site links when I'm more established here.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    What text are you talking about? "Old Time Rock" etc? The page looks fine in Firefox.

  5. #5
    SitePoint Zealot beyre's Avatar
    Join Date
    Dec 2008
    Location
    North Carolina
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ralph,

    Sorry, you don't see the text ... if you look at the source code for the page, there is text that I would rather have below the player, but I currently have positioned above the player:

    Code:
    <div id="flashcontent">
    <p style="color:#FFFFFF;font-family:arial;font-size:11px;">
    To use the 
    <a href="http://www.e-phonic.com/mp3player/" target="_blank" style="color:#FFFF80;">E-Phonic MP3 Player</a>
    you will need 
    <a href="http://www.adobe.com/products/flashplayer/" target="_blank" style="color:#FFFF80;">Adobe Flash Player 9</a> 
    or better and a Javascript enabled browser.</p>
    </div>
    Barbara E.

    Will add my site links when I'm more established here.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Ah, yes, sorry. That text is not meant to show up unless someone does not have Flash installed. So I'm not sure what the positioning issue is about.

  7. #7
    SitePoint Zealot beyre's Avatar
    Join Date
    Dec 2008
    Location
    North Carolina
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ralph,

    Ahhhh, that would certainly explain it!
    Strange that I have seen both on other sites (this specific player, etc).

    Question: why does the <div> have to be before the player in the code?

    Question: there doesn't seem to be any extraordinary about the <div> block of code/text ... how is it being controlled in the manner you said?

    Thanks so much for helping out ... your time has been very appreciated.
    Barbara E.

    Will add my site links when I'm more established here.

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by beyre View Post
    Question: why does the <div> have to be before the player in the code?
    If I understand you rightly (and this is not my area) but the div has an id on it that the script no doubt needs to reference for everything to work. If the JavaScript code came before the div, it would not be able to find the div, as the browser loads all the code from top to bottom.

    Question: there doesn't seem to be any extraordinary about the <div> block of code/text ... how is it being controlled in the manner you said?
    I'm sure that's all part of the player code. The default text is shown when the Flash player plugin can't be found. I guess it's a bit like JavaScript <noscript>, which only come into force if JavaScript is disabled.

  9. #9
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    589
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by beyre View Post
    Ralph,

    Ahhhh, that would certainly explain it!
    Strange that I have seen both on other sites (this specific player, etc).

    Question: why does the <div> have to be before the player in the code?

    Question: there doesn't seem to be any extraordinary about the <div> block of code/text ... how is it being controlled in the manner you said?

    Thanks so much for helping out ... your time has been very appreciated.
    The div is actually a DOM object. SWF object will search for that DOM and insert the flash content in it.

    so.write("flashcontent")

    The DOM needs to be launched/loaded first. There is no CSS needed for this unless you are positioning it absolutely or relatively to other elements.Height and Width is declared via SWF Object:

    var so = new SWFObject("ep_player.swf", "ep_player", "269", "226", "9", "#FFFFFF");

    I see you already got it working well congratulations and happy coding
    Don't Panic


Bookmarks

Posting Permissions

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