Welcome to WebmasterWorld Guest from 23.20.230.24

Forum Moderators: open

Message Too Old, No Replies

Text appear when flash not available

     
5:47 am on Nov 4, 2010 (gmt 0)

5+ Year Member



Hi,

I have a couple of flash images sitting inside tables (only way I could align them).

As some people or devices don't have flash, I would like to have it so that when the page loads, rather than having a blank space, text appears instead.

I have seen this done, but can't seem to get mine to work. I have uploaded my flash as an image and then imbedded it into the page.

Thanks
Jess
7:12 am on Nov 4, 2010 (gmt 0)

5+ Year Member



I recommend swfobject2 [code.google.com], especially the "dynamic" method (consult the documentation there) is the simplest and avoids any "click to activate" mechanisms in finnicky browsers, though you can also display alternative content using markup similar to the "static" method without even using swfobject2, just fyi. (If you're currently embedding via adobe's default javascript garbage, toss it for swfobject2)

Incidentally, a typical piece of alternative content should usually use:
<a href="http://get.adobe.com/flashplayer/"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="get flash player"></a>

within at least one of your flash object alternative content holders on the page (you may want to cache the image on your server)
3:26 pm on Nov 5, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Right, you have a div/paragraph/other element with an id, design it without Flash so it's functional. Then you add SWFobject, and the content is replaced by the Flash if it's supported. I wouldn't use a link though, that would potentially put a block level element inside an inline element and would all be linked.

<div id="flash-placeholder"> <!-- or p or .... -->
<a href="http://get.adobe.com/flashplayer/"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="get flash player"></a><br>
All this will get replaced by Flash
</div>
 

Featured Threads

Hot Threads This Week

Hot Threads This Month