SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,881
    Mentioned
    208 Post(s)
    Tagged
    12 Thread(s)

    How to detect presence of Flash player

    Hi,

    My client has a Flash animation which he wants to embed in his web page.
    In the interests of accessiblity, I have persuaded him to offer the same content as HTML (for those who don't have Flash).
    My question: How does one go about detecting if Flash is present, so as to offer the appropriate content?
    Is there such a thing as a <noscript> tag, but for Flash?

    Thanks in advance

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,109
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    You can have fallbacks in your code for when Flash is not available. For example, in this code ...

    Code:
    <object data="/flash/file.swf" type="application/x-shockwave-flash">
      <param name="movie" value="/flash/file.swf">
      <param name="wmode" value="opaque">
    	<object type="image/jpg" data="/images/fallback.jpg">
                   <p>Jeesh, images off too?</p>
    	</object>
    </object>
    ... a Flash file will play unless Flash is not supported, in which case an image will display instead ... unless images are off, in which case a paragraph will display instead.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,881
    Mentioned
    208 Post(s)
    Tagged
    12 Thread(s)
    Thanks for that. That sounds exactly like what I was after.
    I'll try it out tomorrow.


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
  •