Configure API without config.xml file

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

Moderators: Lapo, Bax

Post Reply
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Configure API without config.xml file

Post by Pippoflash »

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: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Configure API without config.xml file

Post by Lapo »

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
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Re: Configure API without config.xml file

Post by Pippoflash »

Beautiful, thank you.
-----------------------
www.pippoflash.com
-----------------------
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Re: Configure API without config.xml file

Post by Pippoflash »

I could have seen it easily myself in API :) thanks for compensating my lazyness...
-----------------------
www.pippoflash.com
-----------------------
Post Reply