Showing image in place of flash to iphones and ipads
- by poindexter
I want to detect user-agent on load and if the visitor is viewing on an iPhone or iPad I want to display this code:
<?php get_header(); ?>
<div class="flash">
<img src="/wp-content/themes/iq-iphone/main-page-image.png"/>
</div>
If it's a regular visitor I want to display this code:
<?php get_header(); ?>
<div class="flash">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','924','height','316','src','<?php bloginfo('template_directory');?>/images/featurePanel','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','<?php bloginfo('template_directory');?>/images/featurePanel','wmode','transparent' ); //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=7,0,19,0" width="924" height="316">
<param name="movie" value="<?php bloginfo('template_directory');?>/images/featurePanel.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="<?php bloginfo('template_directory');?>/images/featurePanel.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="924" height="316"></embed>
</object>
</noscript>
</div>
Any ideas? Thanks!