Flash Detection

openmind's picture

He has: 945 posts

Joined: Aug 2001

OK,

Here's the story so far! I have developed a working proof for a new site I am working on. You can see it here .

I am making the site XHTML Transistional and so far, it validates albeit with an odd message about Character Encoding Mismatch which I'm not too sure about.

The header and the side menu is Flash. When opened in IE if there is no Flash, it kicks off the loader, which installs, everything OK.

Opera and firebird it does nothing, just shows two white spaces where the flash file should be.

Both the header and the menu are include files and I want to keep it this way. They are pulled in with CF but this isn't really relevant.

This is what I want to achieve:

1) Detect if Flash is there regardless of the browser/system
2) If no Flash use a different include to pull in a static image
3) It must validate

I've tried all sorts of combos/scripts but none of them satisfy the above conditions....

Anyone got any bright ideas before I smash my computer to very small pieces Smiling

openmind's picture

He has: 945 posts

Joined: Aug 2001

I did a bit of Googling and cam across this article that deals with the issue I'm experiencing.

If you check out the proof now and you don't have Flash installed it will serve up a graphical reprsentation instead with an obvious prompt to download Flash.

The code is as so:

<object type="application/x-shockwave-flash" data="flash/0656_about.swf" width="766" height="167">
  <param name="movie" value="flash/0656_about.swf" />
  <param name="quality" value="high" />
  <cfinclude template="../flash/noflashHead.cfm">
</object>
'

The pros:
1) It still validates
2) It works in IE, Opera and Mozilla (although in IE there is a thin bar running through the top part of the page
3) It doesn't use script etc. so no worrys with JavaScript being switched off to detect Flash

The cons:
1) Increas page size and load time
2) Slight formatting issue with IE but that could be me! Smiling

If anyone has a better method, I'd be glad to hear it! Smiling

Busy's picture

He has: 6,151 posts

Joined: May 2001

do you really need the flash?

openmind's picture

He has: 945 posts

Joined: Aug 2001

Well I quite like the animation effect. I can't say that it would be as a detriment to the site if I didn't use Flash but I think it adds to the overall effect...

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

I'm not a fan of using Flash for navigation. Easier, especially for users, to use hyperlinks. Example: I can't use mouse middle-click in Mozilla to have the link open in a new tab. Also can't "copy link location" with my familiar context-menu, and can't highlight text.

Imo, much of the style in that nav can be reproduced with CSS, if you really really wanted. Except for the fading, of course, for which you might use Javascript. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.