SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2007
    Location
    Ryde, Isle of Wight, UK
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with background music

    I have an issue with a client who wants a sound clip on her website - I've managed to persuade her that it should only be on the home page, not looped and turns off after 22 seconds . Unfortunately I haven't been able to persuade her that the website is much nicer without the sound at all.
    This is where my problems lie - which ever system I use
    HTML Code:
    <embed src="images/nature013 1.mp3" autostart="true" hidden="true" loop="false"></embed>
    or
    Code JavaScript:
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','18','height','18','title','Waves Sound File','src','Sound','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Sound' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="18" height="18" title="Waves Sound File">
          <param name="movie" value="Sound.swf" />
          <param name="quality" value="high" />
          <embed src="Sound.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="18" height="18"></embed>
        </object>
    It turns my strict validated page to non-validated. I really am not happy with this situation as the rest of the site is compliant.
    Can any one suggest a simple method that will enable me to make my page compliant.
    Sometimes I wish that clients would listen to good constructive advice.

  2. #2
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Even I used this code... But it was not working... I want the clear reason...

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no, and has never been any embed element in HTML (although I believe it's being introduced in HTML5).

    The embed element type seems to be well supported by most browsers, but it's not HTML and won't validate.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Member
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post

    This works for me when I use it, it is also exampled on W3Schools.

    HTML Code:
    <embed src = "Media/08. Nothing Else Matters.mp3" autostart = "true" hidden="false" align="center" />
    Also this may work.. but only worked sometimes for me. For more information on it look up "The Object Element" on W3Schools.

    HTML Code:
    <object id="SNDTIGER" width="0" height="0" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject">
    <param name="FileName" value="sounds/tiger.mp3">
    <param name="autostart" value="0">
    <param name="showcontrols" value="false">
    <param name="looping" value="true">
    </object>
    These both have different information filled out in them, but I used them for 2 different projects.
    I also recommend seeing if she will agree with showing it on the page, if she wants it to play all the time (and won't budge). Then the user can choose whether they actually want it playing at all.. nothing worse than music that you can't stop.

    Quote Originally Posted by AutisticCuckoo View Post
    There is no, and has never been any embed element in HTML (although I believe it's being introduced in HTML5).

    The embed element type seems to be well supported by most browsers, but it's not HTML and won't validate.
    You are a far behind for being the XHTML/HTML Guru of 2007. HTML 5 has been out for quite a while now and the <embed> tag along with it. It worked in IE 6 and such, so I don't know why you wouldn't know of it...

  5. #5
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Eudanil View Post
    You are a far behind for being the XHTML/HTML Guru of 2007. HTML 5 has been out for quite a while now
    I'm not totally awake yet... is this humour or serious?

    Also - don't always rely on things you see at W3Schools - it isn't related to the W3C (although it's happy for us to assume it is!).
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Eudanil View Post
    You are a far behind for being the XHTML/HTML Guru of 2007. HTML 5 has been out for quite a while now and the <embed> tag along with it. It worked in IE 6 and such, so I don't know why you wouldn't know of it...
    The latest version of the HTML5 specification is labelled as 'Editor's Draft'. That's a long, long way from becoming a recommendation. It's no more of a standard than if I were to cook something up myself and call it HTML9&#189;.

    I'm fully aware of the support of embed, as I indicated in my post above. But is has never been a part of any official HTML recommendation, and it still isn't. I may become so once HTML5 reaches the level of Candidate Recommendation or Recommendation, but that's some time in the future. I'm talking about right now.

    You may choose to use embed, but you can't expect it to validate as HTML at this time.
    Birnam wood is come to Dunsinane

  7. #7
    SitePoint Member
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well even if it isn't out yet, all of the code I have used from it on W3 has worked. It might be the fact they base their tutorials closest to the W3C standards as they can.

    Fair enough, but other than embed and object I haven't seen anything. The DTD most people don't use because the browsers can support stuff that it doesn't, such as HTML 5 tags.. although HTML 5 doesn't "exist" yet.

  8. #8
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.alistapart.com/articles/byebyeembed

    You might want to read that.

  9. #9
    SitePoint Member
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It points out about object aswell... if any of you notice, I DID put a object example that works -_-

    Instead of whining about what I say why don't you guys help people that need help with sites.. instead of just complaining about them

  10. #10
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <moderator_hat_off>

    Okay, let's calm down here - I'd hate to see warnings getting issued. Nobody's complaining or whining here, so I don't see what you're getting at with making such accusations. The reason why your technique isn't validating against the DOCTYPE you chose is because <embed></embed> is not a part of the HTML 4.01 or XHTML 1.0 specification, in any flavor (Strict, Transitional or Frameset). Since HTML 5 is not yet a recommendation or candidate recommendation, Tommy was correct to point out that it is not currently valid HTML code.

    Also note that the article I linked to points out and illustrates examples where the OBJECT element can be used without the need for JavaScript or the non-standard (as of the HTML 4.01 and XHTML 1.0 specifications) EMBED element as well while still validating against a Strict DOCTYPE.

    So please, relax a bit.

    </moderator_hat_off>

  11. #11
    SitePoint Member
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't use embed in the OBJECT element and it doesn't need Javascript.. and I don't use Strict DOCTYPE because it doesn't let me do much with the site.

  12. #12
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oops, you're right. Got you confused with the original poster. Posting at 3 in the morning can have that effect on me at times. Sorry about that.

  13. #13
    SitePoint Member
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its okay

  14. #14
    SitePoint Enthusiast bobsmithmoodeyit's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable, Bedfordshire, United Kingdom
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wouldn't use sound on a website anyway, find it most annoying!


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
  •