4.1 Installing the Flash/Flex API

In order to talk to SmartFoxServer from Flash you will need to install the SmartFoxServer Client API.
The API add new classes to your Flash / Flex environment that you can use to easily interact with the Server by sending requests and handling events.

After you have installed your copy of SmartFoxServer you will find a "Flash API" folder in the main SFS directory. The folder contains two different packages that can be easily installed, based on which version of Flash / Flex you're using.

» Installing with SmartFoxServer 1.6 and higher

SmartFoxServer 1.6.x note:
Due to the various bugs and update difficulties found using the Adobe Extension Manager we don't provide the API in mxp format anymore.

The Flash/Flex API are now distributed as source files that you can store in your preferred directory on your local disk.
In order to add them to your projects simply follow the instructions below:

In order to use the ActionScript (2.0 and 3.0) Flash API you simply have to point the classpath of your project to one of following directories:

depending on the language version you have decided to use.

» Setting the classpath in Flash:

» From the properties panel click the "Settings..." button.


» A new dialogue window will open, click on "Settings..."


» From this box click on the "target icon" to specify the location of your classes


» Browse your local disk and point to the Actionscript 2.0 or 3.0 folder


» Click the OK button to close the various windows and apply the settings.

» Setting the classpath in Flex Builder:

» From the Navigator window right-click on your project main folder and choose "Properties".

Flex Step 01

» From the properties panel select "Flex Build Path" and click the "Add Folder..." button

Flex Step 02

» Browse your local file system and select the Actionscript 3.0 API folder.

Flex Step 03

» Click the OK button to close the various windows and apply the settings.

» API documentation

For more info about the Flash Client API, please refer to section 4.1, and section 4.2 of this documentation.


Installing with earlier versions (pre 1.6.0)

You will find the following packages in the Flash API/ folder inside your server installation directory.

SmartFoxClient_AS2.mxp Extension for Flash MX 2004 / Flash 8 (AS 2.0)
SmartFoxClient_AS3.swc SWC library for Flash CS3 / Flex Builder 2

» Installing under Flash MX2004 and Flash 8

Double click the provided .mxp file, the Adobe Extension Manager should open: follow the simple instructions on screen and restart Flash in order to use the newly installed extension.
Check this url if you need to upgrade your Extension Manager.

» Installing under Flex Builder 2

All you need to do is adding the provided SWC to the build path of your new Flex project:


doc index