Be a Supporter!

Newgrounds cross domain policy

  • 263 Views
  • 7 Replies
New Topic Respond to this Topic
ZT
ZT
  • Member since: Jun. 11, 2003
  • Offline.
Forum Stats
Member
Level 21
Blank Slate
Newgrounds cross domain policy Feb. 1st, 2013 @ 11:09 AM Reply

Hey guys!

Gettin' ready to publish a new game that has a multiplayer mode. It requires a crossdomain.xml file to be located on the server somewhere.

I know there are plenty of multiplayer games already on Newgrounds, but am new to developing multiplayer games myself. Does anyone know for sure whether or not this file exists on NG?

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Newgrounds cross domain policy Feb. 1st, 2013 @ 11:17 AM Reply

At 2/1/13 11:09 AM, ZT wrote: Does anyone know for sure whether or not this file exists on NG?

Why would you want it on NG?

ZT
ZT
  • Member since: Jun. 11, 2003
  • Offline.
Forum Stats
Member
Level 21
Blank Slate
Response to Newgrounds cross domain policy Feb. 1st, 2013 @ 11:33 AM Reply

At 2/1/13 11:17 AM, milchreis wrote:
At 2/1/13 11:09 AM, ZT wrote: Does anyone know for sure whether or not this file exists on NG?
Why would you want it on NG?

I could be mistaken, but I believe this file is required on the server where the SWF exists.

I'm using a smartfox server, so maybe this is an atypical set up.

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Newgrounds cross domain policy Feb. 1st, 2013 @ 11:58 AM Reply

At 2/1/13 11:33 AM, ZT wrote: I could be mistaken, but I believe this file is required on the server where the SWF exists.

The crossdomain.xml restricts access basically, so that would be a poor security if you -the owner of the swf- were to allow or restrict the access.

"Welcome to the CIA website, please make sure you do not allow your swf files to mess with our stuff please, hm kay?"

"What could go wrong"
http://docs2x.smartfoxserver.com/DevelopmentBasics/connectio n-phase

http://www.smartfoxserver.com/docs/1x/index.htm?http://www.s martfoxserver.com/docs/1x/docPages/articles/fp_security.html

http://kb2.adobe.com/cps/142/tn_14213.html

ZT
ZT
  • Member since: Jun. 11, 2003
  • Offline.
Forum Stats
Member
Level 21
Blank Slate
Response to Newgrounds cross domain policy Feb. 1st, 2013 @ 12:40 PM Reply

Wow! That's an incredibly thoughtful reply, thank you so much!

For those dealing with a similar issue, I'm 90% sure that I solved the problem using Security.loadPolicyFile(); and loading in an external cross domain policy.

I say 90% because the swf still doesn't connect when launched directly, but seems to work fine once embedded in a page. I'll post an update when I know for certain / have everything worked out.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Online!
Forum Stats
Member
Level 05
Game Developer
Response to Newgrounds cross domain policy Feb. 1st, 2013 @ 12:44 PM Reply

At 2/1/13 12:40 PM, ZT wrote: I say 90% because the swf still doesn't connect when launched directly, but seems to work fine once embedded in a page. I'll post an update when I know for certain / have everything worked out.

this may clear things up.


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
ZT
ZT
  • Member since: Jun. 11, 2003
  • Offline.
Forum Stats
Member
Level 21
Blank Slate
Response to Newgrounds cross domain policy Feb. 1st, 2013 @ 01:16 PM Reply

Whaaaat?!

I really didn't expect as much help as I've gotten. You guys seriously kick butt. The tool above, and that whole collection on GitHub is freakin' awesome.

I'm now something like 98% sure that the problem is fixed. Basically followed this: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_se curity.html

To paraphrase, I removed everything that wasn't nested directly inside of the <cross-domain-policy> nodes.

Cheers!

szamajstudio
szamajstudio
  • Member since: Dec. 31, 2012
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Newgrounds cross domain policy Jul. 10th, 2013 @ 02:38 PM Reply

I'm now something like 98% sure that the problem is fixed. Basically followed this: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_se curity.html

Hey, ZT, could you paste content of your crossdmain.xml file and code from your loader? That loader you upload to Newgrounds? I have tough time with it, tested tons of "LoaderContex" and "ApplicationDomain" settings, none work. Only thing i manage to get is to open my game in another browser tab T.T

I would really appreciate any help, cheers!