Testing for Flash

Ok, possibly another stupid question but...

I'm writing a website that uses flash, however, I'm sure that some of my visitors won't have Flash player installed so...

Is there any way my site can query the visitors browser to find out if Flash player is installed? I'd imagine there is a way of putting a flash movie on a site and if it loads it can redirect to flash-enabled pages but if it's not installed, the visitor will be prompted to install it (or at least that's my understanding)

The site is written  so that PHP serves every page and, depending on whether or not $flash is set to 1 or 0 will serve either plain HTML or my spiced-up content. At the minute, users can select whether or not they want to view flash pages and that information is saved in a  cookie. If the visitor has cookies disabled then it will default to showing flash content (I want the defaul to be flash-enabled as most people won't bother trying to change this setting and I want a nice default look if possible)

That was quite a rambling description but I think you understand what I need.

Any help greatly appreciated. Thanks!
LVL 5
basiclifeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vickerleungCommented:
basiclife~

Yeah, is me again~

Okay, actually there are a few ways of doing this

1. I think IE itself will detect =.="

2. If you use Dreamweaver to make the page, when you insert the flash into the page,
Some codes will automatically generated so that if not installed, it will redirect to the download page
The code is quoted below

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="550">
  <param name="movie" value="xxxxxx.swf">
  <param name="quality" value="high">
  <embed src="xxxxxx.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="550"></embed>
</object>

3. Using the publish function inside Flash
File Menu > Publish settings

Cheers :)
Vicker
0
basiclifeAuthor Commented:
Ah, I know you cans et it to download it id you don't have it, what I want is for my site to display alternate content if you don't have it, so my site needs to be able to query the browser directly before / while generating the page (or generate a test page that will answer the question but I'd rather avoid this if possible)
0
basiclifeAuthor Commented:
have a look at www.abracadabra.eu.com/showpage.php?page=events&flash=0&lang=en

Bear in mind this is a work in progress (actually for a balloon company for a relative that I'm playing with in my spare time, and no the colour scheme wasn't my idea :D)

The URL above should take you to the HTML version of the menu and you'll get a link to the Flash version. Because of the cookies, if you ever go back to the events page, it'll remember whether or not you chose to use flash and display the correct content. What I need is some way of deciding whether the visitor is capable of displaying Flash without prompting them to install it.

Oh, and I don't use dreamweaver / other site generators - I use a plain text editor (ok, it has some nice features, but a plain text editor nonetheless)

Cheers for the help vikker - at this rate I'm going to finance you points-wise for your next certificate 8-D
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

vickerleungCommented:
basiclife~

haha~~ ok I got your meaning

try this great script editor~

http://www.echoecho.com/toolflashembedder.htm

Vicker
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
krishnaprathabCommented:
Can you let me know which version of Flash you are using?

If its MX2004 it has an inbuild detection mechanism which you can invoke by changing the publish settings. Let me know.

-KP
0
nishasrilankanCommented:
IF you are using Flash MX 2004 you can set alternate page by this way...

First design the Flash page and the page you want to display if the user doesnt have installed Flash player with the users browser.

then follow this path..

File -> Publish Settings -> HTML

in the HTML Tab there is a little check Box between Template and Dimensions

select the Check Box and the Settings button will enabled, Click the Settings button

there you can set the alternate page. If you want to generate default page dont chage anythis..or else check the "use existing" radion button and browse the page you want to display..

hope this helps...

or there is a good tutorial regarding the matter

http://www.sitepoint.com/article/techniques-unearthed

0
basiclifeAuthor Commented:
Flash MX (6.0)
0
basiclifeAuthor Commented:
vikker: That script generator is EXCELLENT except... It doesbn't work in FireFox. Firefox is Mozilla 9ie netscape) but desn't identify itself that way. It also doesn't work in Opera, and since Firefox is my main browser, the site has to be compatible with that as well as IE and NS
0
basiclifeAuthor Commented:
nishasrilankan: Excellent link, thank you very much. As far as I can tell, however, there's no guaranteed method. Anyone know any different?
0
fixitbenCommented:
I don't know if this is what you are looking for but it has some good info.
Or you could modify it a little for your app.
http://www.kirupa.com/developer/mx/detection.htm

Fixitben
0
fixitbenCommented:
Or check out this one it allows you to do the MX 2004 thing with out MX 2004 http://www.macromedia.com/software/flash/download/detection_kit/

Fixitben
0
basiclifeAuthor Commented:
fixitben: I'm reading those links while I'm typing this so it may be wrong soon but... I've been told by a number of different ppl that the only 100% reliable way is using a test page as a redirect - IE if there's flash it'll go to URL 1 using a Flash object designed for that purpose, otherwise it'll timeout and go to URL 2
0
basiclifeAuthor Commented:
Hmmm. Looks like the detection script will work MOST of the time. I think I'm going to have to settle for that

If there are any better suggestions let them come now otherwise I'll split the points tomorrow.

Cheers for all your help guys
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.