Configure API without config.xml file

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

Moderators: Lapo, Bax

User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Configure API without config.xml file

Postby Pippoflash » 28 Mar 2017, 14:22

Hi,
since we use a set of conditions to determine which server, ports, etc. we are going to use, we wouldn't like to maintain a large amount of config files, but centralise everything.
Is it possible to confgure API without using an external XML file?

I.e.:
Configure with XML node/string directly
Configure with single parameters
etc.

Thank you
-----------------------
www.pippoflash.com
-----------------------
User avatar
Lapo
Site Admin
Posts: 19676
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Configure API without config.xml file

Postby Lapo » 28 Mar 2017, 15:14

Yes, via the ConfigData object.
http://docs2x.smartfoxserver.com/api-do ... gData.html

You create one, set all its properties then pass it to the SmartFox.connectWithConfig(...) method

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Re: Configure API without config.xml file

Postby Pippoflash » 28 Mar 2017, 15:37

Beautiful, thank you.
-----------------------

www.pippoflash.com

-----------------------
User avatar
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Re: Configure API without config.xml file

Postby Pippoflash » 28 Mar 2017, 15:40

I could have seen it easily myself in API :) thanks for compensating my lazyness...
-----------------------

www.pippoflash.com

-----------------------

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 2 guests