Cookie redirect question

So i’m making a redirect using flash but once people get redirected to the page I don’t want them to get redirected twice. So that’s why I have the cookie. However I would like to redirect them to another page if they’ve already been redirected to the first page (which is what my cookie is for). So here’s the code that I have. If you guys could tell me what to do next that would be appreciated.

cookie=SharedObject.getLocal("mycookiename");
if(cookie.data.viewed==null)
{
    getURL("myurlhere", "_parent", "GET");
    cookie.data.viewed=1;
    cookie.flush();
}

I’m actually wondering this too, anyone got any ideas?

Seriously, nobody knows? There has to be some way to do this.

sorry i didnt quite understand what you ment by

If you guys could tell me what to do next

the code u have at the moment looks like it should work…
so shouldnt it just b…

[COLOR=#0000ff]align[/COLOR]=[COLOR=#ff0000]“left”[/COLOR]>cookie=[COLOR=#0000ff]SharedObject[/COLOR].[COLOR=#0000ff]getLocal[/COLOR]COLOR=#000000[/COLOR];
ifCOLOR=#000000[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]getURL[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“myurlhere”[/COLOR], [COLOR=#ff0000]“_parent”[/COLOR], [COLOR=#ff0000]“GET”[/COLOR][COLOR=#000000])[/COLOR];
cookie.[COLOR=#0000ff]data[/COLOR].[COLOR=#000080]viewed[/COLOR]=[COLOR=#000080]1[/COLOR];
cookie.[COLOR=#0000ff]flush[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR][COLOR=#0000ff]else[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]getURL[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]

Thanks for the reply but that’s not working.

Edit: Yes it did… Thanks!

no problem.!

yeah i just tested it again. i think i accidently put [COLOR=#0000ff]align[/COLOR]=[COLOR=#ff0000]“left”[/COLOR]> at the begining of the last code i posted.

so when i tested it worked and the code was.

cookie1=SharedObject.getLocal(“mycookiename”);
if(cookie1.data.viewed==null)
{
getURL(“firsttime.htm”,“_blank”);
cookie1.data.viewed=1;
cookie1.flush();
}else{
getURL(“secondtime.htm”,“_blank”);
}

i change the"cookie" name to test it properly.