I just did this on an ASP project. We used Moock's Flash detection script
(which cannot detect IE4.5 for Mac, but then, nothing can) in a prepage
(index.asp) which did a Javascript redirect to SetSession.asp (using
location.replace('URL')) after it detected the relevant facts about the
user's browser. Index.asp passed the vars to SetSesion.asp via query
string.
In SetSession, I set all the detected vars to session, like browser type,
version, platform, and flash version(s) (we are using flash4 and flash5).
That page creates no output, and then at the end it redirects to home.asp,
where the actual content is.
As for the pages with Flash on them, I checked the session variable on the
page to see if Flash was available, and if so displayed the Flash, else
displayed an image with a link on it to upgrade to the latest version of
Flash. In Fusebox you can simply display a different page, but if there is
a lot of other stuff going on in the page, it probably makes more sense to
not replicate all that functionality, and to instead do your conditional in
the page.
See it in action here: http://www.wifilmfest.org (WARNING: This site is not
even remotely Fuseboxed. Not even close. If Fusebox is Earth, we're
talking Tatooine, here... long long ago, far far away...)
HTH,
David Huyck
[EMAIL PROTECTED]
> Hello,
>
> Does anyone have example code that does the following:
>
> <IF FLASH PLUGIN IS DETECTED>
> Play flash
> <ELSE>
> Display an Image
>
> I know this will probably have to be JavaScript, but do people think it's
a
> good idea for the result of the JavaScript to be sent back to Coldfusion
to
> be added to a session variable?
> <cfif NOT CompareNoCase(session.flash, "Yes")>
> <cfmodule template="dsp_flash.cfm" movie="hello">
> <cfelse>
> <cfmodule template="dsp_AltFlashImage.cfm" image="hello">
> </cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists