Multiple Domains

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
croftie
Posts: 49
Joined: 24 Jul 2013, 08:35
Location: Algarve Portugal
Contact:

Multiple Domains

Post by croftie »

So here is the scenario

I have the sfs2x server running perfectly on one server and the flash client is hosted on another server. I want to be able to call the flash client from multiple other domains. What seems to be happening is that the client loads fine but fails to find the config xml with the server details. I can't tell exactly because I cannot get error messages because running the client in debug is all local so I can't replicate the situation.

should I just hard code the server settings or is there a way for external domains to retrieve the client and still see the config xml? I would like to be able to include the xml since then I can load local branding etc for each domain.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multiple Domains

Post by Lapo »

I have the sfs2x server running perfectly on one server and the flash client is hosted on another server. I want to be able to call the flash client from multiple other domains.
So in other words you have a flash game and you want to be able to access the same game from a number of different domains, such as my-game.com, your-game.com, their-game.com.

Is this correct?

If that's the case you need to configure your web server appropriately by using server aliases. In other words one domain will point to the actual folder where the game is, and the other domains will be just aliases pointing to the same domain.

Unfortunately this is not much an SFS-related question so I can't help more that this, but we've already done it in servers like Apache and it's pretty simple. Google this and you'll find all the tutorials you need.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
croftie
Posts: 49
Joined: 24 Jul 2013, 08:35
Location: Algarve Portugal
Contact:

Re: Multiple Domains

Post by croftie »

No thats not what I was asking.

The other domains will not be in my control, IE they will be provided with the invocation code for the flash application which sits on my server. The question is whether the application can access the config file in that scenario either locally from the location of invocation or the config file where the flash swf is hosted. Or even if that is possible at all.

The flash app is loading fine as stated but it does not connect with the SFS2x server either with local config xml or in the location where the flash swf is located.

I don't know if that is clear or not
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multiple Domains

Post by Lapo »

[quote="croftie"]No thats not what I was asking.

The other domains will not be in my control, IE they will be provided with the invocation code for the flash application which sits on my server. The question is whether the application can access the config file in that scenario either locally from the location of invocation or the config file where the flash swf is hosted. Or even if that is possible at all./quote]
The configuration file can only be local to the application, i.e. deployed in the same server. It's not possible to load it from another domain/url.
Lapo
--
gotoAndPlay()
...addicted to flash games
croftie
Posts: 49
Joined: 24 Jul 2013, 08:35
Location: Algarve Portugal
Contact:

Re: Multiple Domains

Post by croftie »

I am guessing that as a work around it would be possible to introduce the settings via params in the invocation javascript.

On a separate note may I have the patch code for OpenSpace with version 2.9?

:D
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Multiple Domains

Post by Bax »

croftie wrote:On a separate note may I have the patch code for OpenSpace with version 2.9?
Please send us an email requesting it.
Paolo Bax
The SmartFoxServer Team
Post Reply