Jump to content

HTML5 and Conditional IF Statement


Dennis
 Share

Recommended Posts

Hello Everyone, I need some help with adding a conditional IF statement within HTML5 code to execute a Flash .SWF slideshow if the browswer is IE8 and below. Problem: Slideshow not showing on IE8 I recently upgraded to Adobe Flash Professional CS6. The reason for upgrading is to be able to view my slideshows on all browsers and iOS devices since I have many Adobe Flash .SWF slideshows. With the new Flash Professional CS6 I use their Adobe "Toolkit to CreateJS" that creates both HTML5 & Javascript code. When testing, the slideshows display fine on iOS devices, all browsers EXCEPT IE8 and below. I also discovered that this is a known problem for Adobe and they are working on it. Meanwhile, I need a work around and I believe a conditional IF would do the trick. BUT I need help with it. I believe my request is pretty simple and straight forward for someone other than me and that is to: 1. Determine the browser to display the slideshow2. Based on the answer use either the HTML5 code or use the Flash .SWF code If the current brower is equal to or less than IE8 then play the .SWF slideshow, otherwise, play the HTML5 code. Please contact me if you think you can help. Dennisdennis@casarenterprises.com

Link to comment
Share on other sites

Have you even tried using IE conditional comment with html5 embed? <!--[if lt IE 9]><embed width="230" height="172" src="myflashfile.swf" type="application/x-shockwave-flash"><![endif]--> or

 <style type="text/css">#worse_IE {display:none;}</style><!--[if lt IE 9]><style type="text/css">#worse_IE {display:block;}#better_and_IE9 {display:none;}</style><![endif]-->

<embed id="better_and_IE9" width="230" height="172"  src="myflashfile.swf" type="application/x-shockwave-flash"><embed id="worse_IE" width="230" height="172" src="myflashfile.swf" type="application/x-shockwave-flash">

Edited by dsonesuk
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...