Be a Supporter!

Share cookies/data across domains??

  • 399 Views
  • 6 Replies
New Topic Respond to this Topic
Captainhams
Captainhams
  • Member since: May. 4, 2008
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Share cookies/data across domains?? 2010-01-04 22:00:02 Reply

Hi, I am trying to create a login system where a user would be able to login inside of one flash game on say, example.com, and then that same login data would be preserved for all the games on example.com and also the games on foo.com and bar.world.com

I am new to shared objects in flash so if anybody knows of a way to do this in either php, as3, html, js (or a mixture of all) then that would be great.

(PS. I would prefer not to use a method that requires a javascript bridge or an embedded flash var to retrieve cookies as this is impossible for games that are played on game-portal sites where only a swf file is submitted, like newgrounds)

Thanks.


lawl

BBS Signature
Captainhams
Captainhams
  • Member since: May. 4, 2008
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Share cookies/data across domains?? 2010-01-06 01:55:09 Reply

BUMP.
So um how does mochigames do it then?


lawl

BBS Signature
Yambanshee
Yambanshee
  • Member since: Oct. 5, 2008
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to Share cookies/data across domains?? 2010-01-06 08:29:51 Reply

SharedObject for AS3


AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature
Captainhams
Captainhams
  • Member since: May. 4, 2008
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Share cookies/data across domains?? 2010-01-06 22:51:43 Reply

At 1/6/10 08:29 AM, Yambanshee wrote: SharedObject for AS3

They are domain specific


lawl

BBS Signature
InnerChild548
InnerChild548
  • Member since: Aug. 10, 2007
  • Offline.
Forum Stats
Member
Level 35
Melancholy
Response to Share cookies/data across domains?? 2010-01-06 23:08:59 Reply

What I would do is store the username/password in a mySQL database. And retrieve/update it whenever I want in the swf.

I don't know if you can do that with AS2, though...


BBS Signature
henke37
henke37
  • Member since: Sep. 10, 2004
  • Offline.
Forum Stats
Member
Level 30
Blank Slate
Response to Share cookies/data across domains?? 2010-01-07 05:44:51 Reply

Flash can still make http requests to unrelated servers, just setup the proper policy file.


Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.

Captainhams
Captainhams
  • Member since: May. 4, 2008
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Share cookies/data across domains?? 2010-01-07 23:29:55 Reply

At 1/6/10 11:08 PM, InnerChild548 wrote: What I would do is store the username/password in a mySQL database. And retrieve/update it whenever I want in the swf.

I don't know if you can do that with AS2, though...

This wouldn't work for preserving the login state because the only way I could associate the user/pass session would be to link it with their current IP address. And the problem with that is, if they have a dynamic IP or it is shared with other ISP users then people will start being automatically logged in as other people (not good)


lawl

BBS Signature