If you have access to Javascript, you can set the cookies like this.
ExternalInterface.call("function() { document.cookie = 'foo=bar;
expires=Mon, 15 Nov 2010 23:59:59 UTC; path=/'; }()");
navigateToURL(new URLRequest("somepage.php"));
Then in somepage, your data will be available in $_COOKIE;
Cheers
Juan Pablo Califano
2010/11/13 Alexander Farber <[email protected]>
> Hello,
>
> I have a small multiplayer Flash game in which you can
> display a player profile by clicking at his or her avatar:
>
> const PROFILE_URL:String = 'http://myserver/user.php?id=';
> try {
> navigateToURL(new URLRequest(PROFILE_URL+id), '_blank');
> } catch(e:Error) {
> }
>
> This works well, but now I'd like to extend the user.php,
> so that players can add comments about each other.
> For authorization I'd like to use HTTP cookies,
> passed from the game.swf to the user.php.
>
> (I don't want use GET or POST here, because GET
> will have the auth. variables in the URL and players might
> occasionaly send that URL around or post it in my forum.
> And POST will ask to re-post the request when you reload).
>
> My problem is, that I can't find the way to set HTTP cookies
> through the navigateToURL() method. Please advise me
>
> Regards
> Alex
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders