Search  

NEED POSSIBLE COOKIE SOLUTION

HomeForumsFlash Discussionneed possible cookie solution
29194 spencer
6 posts
Bought between 1 and 9 items

I have come to a roadblock on how to manage the request that has come from this particular job.

What I need is a solution to when the movie ends on on the home page, it stays at at the end of the movie. If I leave that page and go to another within the website and return to the home page I need the movie to still be at the end..example..http://www.greenbeanscoffee.com/index.php

Cookies have been suggested as a possible solution but I have no idea where to start.

Thanks for anyhelp!!

Posted 6 months ago
18193 ourben
380 posts

Hey spencer,

Three ways off the top of my head…

1) Use SharedObjects

2) If you are PHP use the sessions / cookies

3) If you’re a little smarty pants, use the “document.referrer” something like this…
//actionscript
var referrer:String =  ExternalInterface.call("eval", 
    "document.referrer");
if(referrer.contains("mydomain.com"))
  gotoAndStop("lastFrame");

There are actually a few other cool ways I think, but those should get you started.

edit: I’m not sure if contains is actually a String method… haha nope it isn’t, I have too many language syndrome… try:
if(referrer.indexOf("mydomain.com") >= 0)
...
...instead!

Oh, and make sure you have “allowScriptAccess” in your tags, and the SWF needs an “id” and a “name” attribute otherwise ExternalInterface can’t work right on half-baked browsers.

Posted 6 months ago
29194 spencer
6 posts
Bought between 1 and 9 items

I want the smarty pants way, and I’ll give ya ten bucks if you can work it out for me. Let me know and I will send you a link. It needs to be through your email as I as the client files need to be kept private. Thanks man!

Posted 6 months ago
29194 spencer
6 posts
Bought between 1 and 9 items

Ben,

Great work man thanks for all your help on this !

Posted 6 months ago