Put your cfcookie after the flash. Else it will always be 1 when you get 
to the flash.

<cfparam name="COOKIE.previousvisitor" default="0">


fo.addVariable("previousvisitor",
"<cfoutput>#COOKIE.previousvisitor#</cfoutput>");


<cfif COOKIE.previousvisitor IS 0>
        <cfcookie name="previousvisitor" value="1" expires="100">
</cfif>




Andy Matthews wrote:
> There's a flash video on the front page of my company website. The boss
> wants it to play straight off the first time you visit, then go to a still
> frame with a play button the second (and any time afterwards).
>
> So I thought to myself, cfcookie would be a great idea. I've got this code
> at the top of the page:
>
> <cfparam name="COOKIE.previousvisitor" default="0">
> <cfif COOKIE.previousvisitor IS 0>
>       <cfcookie name="previousvisitor" value="1" expires="100">
> </cfif>
>
> Then, I output the value of the cookie and dump it into the Flash movie like
> so:
> fo.addVariable("previousvisitor",
> "<cfoutput>#COOKIE.previousvisitor#</cfoutput>");
>
> The problem is that it's not working. In FF, I clear ALL of my private data
> (including cookies), but when I reload the page the video is still stuck on
> the still frame. It's not the Flash because it's outputting 1 into the movie
> instead of 0.
>
> What am I doing wrong?
>
> <!----------------//------
> andy matthews
> web developer
> certified advanced coldfusion programmer
> ICGLink, Inc.
> [EMAIL PROTECTED]
> 615.370.1530 x737
> --------------//--------->
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251747
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to