Sunday, 2 January 2011

SFS1X: Installing the API

Hi. In this tutorial I'll teach you how do you install the API so that you can develop applications that use sfs.
There are 2 ways to do this. The docs way and the Rjgtav's way.

First I'll explain the docs way, that is better explained in the docs (

All you need to do is to point the classpath of your application to the location of the api of the actionscript version you're using.
For example if you're using AS2.0 you need to point it to [SmartFoxServer Installation Folder]\Flash API\Actionscript 2.0
while if you're using AS3.0 you need to point it to [SmartFoxServer Installation Folder]\Flash API\Actionscript 3.0.

To set the classpath of your project all you need to do is click in the "Settings..." button in Properties panel, then click in the  "Settings..." button on the right side of the ActionScript version and finally click in the target icon button. Then you only need to select one of the folders I told before.
All of this is better explained in the docs.

Now the Rjgtav's way.
In my way, you only need to copy the ("it" folder for AS2.0 or "it" and "com" folders for AS3.0) located under the respective folders that were previously mentioned to the folder of your project. So simple as that (at least for me it works). But I suggest you to use the one explained in the docs xD.

Important Note: You only need to do this about the API in the pc where the projects are. When you upload your game to your website, you only need to upload the .swf file, because when publishing, Flash compiles all the imported API's in the .swf file, saving some work.

No comments:

Post a Comment