Click to See Complete Forum and Search --> : If Statement For Flash


MontyV
02-18-2009, 01:28 PM
I'm not sure if this is in the right section but here you go. I have a flash header on my site I've been toying around with. Can I have it so that if the user has flash it plays fine but if they don't have a static image?

Some time ago I remember seeing this on a site. Its not an option of flash or non-flash version but rather it was just automatic.

Any links anybody can provide would be much appreciated. I tried searching but I could only find information on general If Statment but nothing with Flash. So I'm not sure if I'm even searching the right thing. I just got If Statement stuck in my head from the only programming class I took over a decade ago Pascal :D

Eye for Video
02-19-2009, 10:50 PM
Place the Flash banner (or any other type of Flash content) on your site with swfobject and create alternate content for viewers that don't have Flash.
http://www.adobe.com/devnet/flashplayer/articles/swfobject_02.html
Older versions are a little easier to use. Here's an example of what I mean, Banner and nav buttons all work even without Flash.
http://www.lostmountainsurfcompany.com
View the page source code for the banner and buttons and notice the code before
<script type="text/javascript">
in those divs, that's the alt content that show if the user does not have Flash. Like this
<td><div id="home_btn" class="btn" >
<a href="index.html"><img src="images/home_btn.jpg" alt="Home Page Button" width="117" height="29" border="0"/></a>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("home_btn.swf", "home_btn", "150", "30", "8", "#095bab");
so.write("home_btn");
// ]]>
</script></td>
All the nav buttons work just fine without Flash. But with Flash... users gets the animated version.
Best wishes,
Eye for Video
www.cidigitalmedia.com