Forum Moderators: open

Message Too Old, No Replies

How to present an image if user hasn't got flash

         

Mr Bo Jangles

2:21 am on Jun 5, 2005 (gmt 0)

10+ Year Member



Hi all,
I've just had my first successful play with SwishMax (seems good!) and I've created a nice banner with two images that fade in and out - so far so good.
But I think I'd like to present just a plain ol' .jpg image if it is detected that the user doesn't have flash loaded - can someone point me to code that will achieve that?

Here's what I've got so far to play the banner:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0"
id="topbanner2" width="757" height="96">
<param name="movie" value="swish/topbanner2.swf">
<param name="bgcolor" value="#000000">
<param name="quality" value="high">
<param name="allowscriptaccess" value="samedomain">
<embed type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
width="757" height="96"
name="topbanner2" src="swish/topbanner2.swf"
bgcolor="#000000" quality="high"
swLiveConnect="true" allowScriptAccess="samedomain"
></embed>
</object>

whoisgregg

12:49 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Between the </embed> and the </object> add your <img> tag and all will be well. BTW, you may want to read up on reducing some of that code [macromedia.com].

Added: I once said the <embed> was necessary for some browsers but that article makes it clear it is possible to remove it.

Richard_N

1:24 pm on Jun 6, 2005 (gmt 0)



Sorry but I could never see the point of the "satay" method... surely IMO this is one case where xhtml is plain wrong, if its not inclusive of such a common tag as the flash <embed> one then thats a defficiency in the mark up language.

Before anyone says I am an advocate of xhtml and css all sites produced here are fully compliant but when it comes to flash we just use the standard Macromedia recommended tags...

whoisgregg

2:18 pm on Jun 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I hand code everything so I've gained an preference for coding methods which are minimal.

As far as XHTML not including a widely used tag... it doesn't include <marquee> and I don't hear any web designers complaining about that. ;)

Richard_N

7:20 pm on Jun 8, 2005 (gmt 0)



I hand code everything as well... big deal, I presume this was a dig presuming I did not to attain some sort of moal high ground?

whoisgregg

7:38 pm on Jun 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not a dig, just expressing how a change in my development style in recent years caused me to change how I looked at inserting flash. Simply, I felt the same way you stated about standard macromedia code when I was clicking the "Insert Flash" button in Dreamweaver. Now that I type it, I like to type less -- so that really just makes me lazy.

No offense intended.

Richard_N

8:17 pm on Jun 8, 2005 (gmt 0)



No problem...long day :-)

I switched to XHTML some 18 months ao and have not looked back. My problem is that all the "solutions" involve compromises or cludges of some description and therefore I just feel uncomfortable using them.

When there is a definitive workaround that does away with the bloated code I will be happy to sue it, but as yet I am just not convinced :-)

Richard_N

8:18 pm on Jun 8, 2005 (gmt 0)



sorry, excuse typos like I said long day <yawn>