The Daily Click ::. Forums ::. Klik Coding Help ::. Multiple online Ports using SWF + Lacewing
 

Post Reply  Post Oekaki 
 

Posted By Message

Ladislau



Registered
  09/07/2015 14:12:11
Points
  3
11th July, 2015 at 11/07/2015 00:12:31 -

Hi everyone.

I have stuck in a wall that I can't find a solution right now.

Mmf2 SWF standard can't work with Lacewing channels so I had the idea to divide players by ports, each port would be a stand-alone application that would run the game in my VPS. It worked when using PC but when it comes to flash, I can't find a turn around regarding the Flash Policy file. It seens that I can only use one XML per IP, and I'm stuck, I even tried to create one XML per application to see if that could work, but only the first server will open and run the XML, the other won't.

Is there a turn around? thanks a lot.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
11th July, 2015 at 11/07/2015 00:30:19 -

Can you post the contents of your policy file?

 
n/a

Ladislau



Registered
  09/07/2015 14:12:11
Points
  3
11th July, 2015 at 11/07/2015 01:01:09 -

Sure. Thanks.

I found it lurking in clickteam forums.

I am using ports after 6001 for my game and that works, however the MMF2 editor only let's me use port 843 to host the XML in the server. I'm stuck to port 843.

Changing the port 583 to another value and trying multiple XMLs hasnt worked.

XML:

---

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" to-ports="6001"/>
<allow-access-from domain="*" to-ports="583"/>
</cross-domain-policy>

---



Edited by Ladislau

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
14th July, 2015 at 14/07/2015 01:49:38 -

Wait so the standard version of fusion only allows you to connect to port 843? Am I reading that right?
If that's the case changing the flash policy file won't fix that.

But anyway for allowing a range of ports just use a dash between each side of the range.

For example this will allow access from the swf.example.com domain for the ports 6001 all the way up to 6100.

<allow-access-from domain="swf.example.com" to-ports="6001-6100" />

ALSO, make sure to change swf.example.com to your local site's domain. So if your site is coolgames.com then change it to that. Alternatively you could just put an * there to allow access to all domains. Same with the ports.

So it would then look like this:

<allow-access-from domain="*" to-ports="*" />

More information can be found here:
http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html


Instead of using ports to simulate channels you could have your own channel system too. Just have some sort of identifier at the beginning of each message from each player and only process messages that come from players in your "channel."

 
n/a
   

Post Reply



 



Advertisement

Worth A Click