Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Detecting if java enabled for CFSET flashmoviename.swf
From: Erik Mattheis
Date: Fri, 20 Oct 2000 00:01:01 +0100

Isn't "java" a reserved word in JavaScript? ... changing it to useJava here ...

A solution would be to set a cookie with JavaScript that holds the
value of navigator.javaEnabled() ... make sure to include path=/ or
ColdFusion won't find the cookie. At the top of your template have
something like:

<cfparam name="useJava" default=0>
<cfif useJava>
<cfset theSwf="javaVersion.swf">
<cfelse>
<cfset theSwf="non_javaVersion.swf">
</cfif>

In your javascript, have something like this:

<cfif NOT useJava>
function checkJavaCookie(){
if (document.cookie.indexOf('useJava=1') >=0 ||
document.cookie.indexOf('useJava=true') >=0)
{ location.reload(true); }
}
onload=checkJavaCookie;
</cfif>

A java enabled visitor always sees the non-Java version load the
first time they connect to one of your pages like this, but that's
the only time. If your non-Java version can take a while to load, you
could check the value of the useJava cookie every half second or so.

I'm doing this type of thing to serve Flash 4 to those with it at
http://gozz.com/ and plain html to those without it ... can send you
the full code off list if you want.


>My question is if I am using cold fusion variables to define the
>parameters and settings how can i add logic to this to be able to use
>say a specific flash file instead of another? (this is a specific
>problem i've seen when trying to do fscommands to flash or flash to
>javascript, etc.) I want to create a work around that enables me to use
>one of two flash files, etc.
>
>The problem I see is that since cold fusion will always execute before
>javascript this is not possible. Has anyone tried this and if so how?
>
>Thanks,
>
>Jack
--

___________________
- Erik Mattheis
http://gozz.com/

(612) 827 3963



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Detecting if java enabled for CFS, Jack Monteleagre

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]