PDA

View Full Version : Alternative image for flash in iphones and ipads


WotNow
08-18-2011, 02:18 AM
Hi everyone, I was wondering what code other people use to display an image for when flash (slideshows) don't work in iphones and ipads. Thanks

Chapo
08-19-2011, 10:49 PM
Well, what i have done is to set an image in the background of the div where the SWF is supose to appear. When the flash doesnt work the image appears.

WotNow
08-20-2011, 02:24 AM
Hi thanks for getting back to me. I have already done that but most of my divs contain a message:
This content requires Flash Player 8 or newer.
<a href="http://www.adobe.com/go/getflashplayer" target="_blank">Go get the Flash Player</a> (free).</p>
<p>If you do have the current Flash Player, then JavaScript is not enabled in your Web browser. Please enable JavaScript to view this content.</p>

I am wondering how important it is to display this message?

Thanks

edbr
08-20-2011, 02:48 AM
if you are using swfobject there is a option for alternate content. sorry dont have example any more but i certainly used to use it. also the javascript warning could be in a noscript tag maybe

edbr
08-20-2011, 05:34 AM
ha found it!! so using swf object. fist part is the path to the image second is to the swf file

<div id="flashcontent">


<img src="../images/your image.jpg" alt="your image" title="your image" width="330" height="150" />
</div>
<script type="text/javascript">
// <![CDATA[

var so = new SWFObject("../images/your_flash.swf", "flash", "350", "300", "0", "");
so.useExpressInstall('expressinstall.swf');
so.addParam("wmode", "transparent");
so.write("flashcontent");

// ]]>
</script>

WotNow
08-20-2011, 04:14 PM
Thanks so much for looking for me, I really appreciate it. I will give this code a go.

edbr
08-22-2011, 02:20 AM
no prob i found i hadnt changed it on dutch version of a site so it gave me a slap on the wrist also :)

Chapo
08-23-2011, 03:12 PM
Hi EDBR, what is the purpose of that code ? When wil be useful ?

edbr
08-24-2011, 04:15 AM
actually im babbling on senselessly this is for when javascript is disabled. i need a holiday :) sorry

edbr
08-24-2011, 09:43 AM
penance http://camendesign.com/code/video_for_everybody

Ricky55
08-26-2011, 02:23 PM
If you use swfobject to embed your Flash content then it does give you an area to provide alternate content.

If you are not that comfortable using swfoject then you can download the swfobject generator which writes the code for you.

You can download both swfobject and the generator from:

http://code.google.com/p/swfobject/downloads/list