SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist kyllle's Avatar
    Join Date
    Jun 2008
    Posts
    469
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flash graceful degradation

    Hi all,

    Im currently working on a site that uses flash for various presentational areas like header banners etc

    I understand not all users have/use flash and I would like to be able to implement graceful dergradation and fall back to maybe an image if flash isnt detected by the browser, can this be done?

    Thanks

    Kyle

  2. #2
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <object> element alternate renderings.



    ala

    Code:
    <object type="application/x-shockwave-flash 
            data="c.swf?path=movie.swf" width="400" height="300">
    <param name="movie" value="c.swf?path=movie.swf" />
    <img src="noflash.gif" width="200" height="100" alt="" />
    </object>
    ff the browser doesn’t know how to play flash, it will simply go for the next child element and give that a try. failing that, you can simply use text.




    w3c

    Code:
    <OBJECT title="The Earth as seen from space" 
            classid="http://www.observer.mars/TheEarth.py">
                        <!-- Else, try the MPEG video -->
      <OBJECT data="TheEarth.mpeg" type="application/mpeg">
                        <!-- Else, try the GIF image -->
        <OBJECT data="TheEarth.gif" type="image/gif">
                        <!-- Else render the text -->
         The <STRONG>Earth</STRONG> as seen from space.
        </OBJECT>
      </OBJECT>
    </OBJECT>

  3. #3
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Alternatively, build your website as if there was no Flash, and then replace the elements with JavaScript, probably using something like SWFObject which does the detecting and creation of the Flash object all for you.

  4. #4
    SitePoint Evangelist kyllle's Avatar
    Join Date
    Jun 2008
    Posts
    469
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats great guys, thanks loads!


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
  •