1814 posts Time is what you desire most, but waste carelessly.
  • Has sold $250,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has been part of the Envato Community for over 5 years
+6 more
Firsh
says

I have an swf that will be used on two different domains. It has to behave the same way on both domains, and the variables that get stored on one domain must be accessible on the other. It’s a shop with a cart system. The visitor puts things in the cart, goes to the other domain and continues shopping. Items added to the cart in the other shop should still be in the cart.

System.security.allowDomain("domain1.com");
System.security.allowDomain("domain2.com");

Like this or how should I do that?

270 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
+1 more
magickaito
says

i dun think the allowdomain has to do with sharedobject i dun think swf on domain1 can read sharedobject on domain 2.

1568 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
dSKY
says

can’t be done.
There is no way to read shared objects from one domain on the other.

1814 posts Time is what you desire most, but waste carelessly.
  • Has sold $250,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has been part of the Envato Community for over 5 years
+6 more
Firsh
says

Any workaround? I read an article that was using loadmovie – a 3rd swf as a helper.

CreativeAddiction
CreativeAddiction Recent Posts Threads Started
160 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
CreativeAddiction
says

localconnection MIGHT help… not sure

EDIT : Something like this… http://active.tutsplus.com/tutorials/actionscript/interface-between-two-files-using-the-localconnection-class/

There might be a workaround using this… good luck

1814 posts Time is what you desire most, but waste carelessly.
  • Has sold $250,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has been part of the Envato Community for over 5 years
+6 more
Firsh
says

They are physically on the same server.. Maybe with database and sessions with php? Or that’s an overkill? :D

2320 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Has referred 1+ members
  • Helped several times protecting Envato Market against copyright violations
+5 more
Nitro_Themes
says

Hey Firsh

Try this post it explains further what you have to do.

http://forums.devshed.com/flash-help-38/help-system-security-allowdomain-any-domain-289646.html

Cheers

Lester

675 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+6 more
dexterous
says

Hi Firsh, If they are in the same domain you can try passing a path to shared object :

sol = SharedObject.getLocal("name","/");

when you use the ”/” as the path, it gets stored at root and then other swf from same domain can use it. Don’t know will it work with different domains.

I have succuessfully used it once.

regards.

1814 posts Time is what you desire most, but waste carelessly.
  • Has sold $250,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has been part of the Envato Community for over 5 years
+6 more
Firsh
says

http://danielmclaren.net/2007/03/22/cross-domain-shared-objects-in-flash

This is it, but I still got some problems. It was working for some time then everything went wrong.. I have 3 domains: 2 domains as clients and one domain as server. It’s logical, loading an SWF from the server that handles all sharedobject stuff. I have crossdomain.xml’s with a * on every domain

<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>

and in every SWF

System.security.allowDomain("*");

I know it’s not secure like this, but I want it to see it working first then I can tighten security..

It uses the server swf very well if I just test it locally but once they are on the domains it doesn’t work..

1814 posts Time is what you desire most, but waste carelessly.
  • Has sold $250,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has been part of the Envato Community for over 5 years
+6 more
Firsh
says

It’s working now, thanks everybody. Seems like it wasn’t so impossible after all :P

by
by
by
by
by
by