OpenSpace logo

Support » OpenSpace installation

Before proceeding, you will need to download the OpenSpace package and unzip it to a folder of your choice. The downloaded package contains the components for the Flash platform, the OpenSpace Editor and the required SmartFoxServer extension. This manual refers to the OpenSpace version compatible with SmartFoxServer PRO, so in the folder of the package containing the components and the extension do not consider the files with the _2X suffix.

For the installation instructions of the OpenSpace version compatible with SmartFoxServer 2X, follow this link.

OpenSpace Flex component

OpenSpace is compatible with Flex SDK 2.0.1 Hotfix 3 or later. To use OpenSpace in Adobe Flex Builder 3 or later (Flash Builder), you can simply drop the OpenSpace_Flex.swc file in the libs/ folder of your Flex/Flash Builder project. The SWC is located at [unzip location]/Client/Components/OpenSpace_Flex.swc.
Alternatively (and for Flex Builder 2) you can add the component SWC to your Library path by following these instructions:

  1. locate your project in the Flex Navigator panel (Package Explorer panel in Flash Builder);
  2. right-click on the project and choose Properties, or open the Project menu and choose Properties;
  3. in the project properties dialog, choose Flex Build Path;
  4. select the Library path tab, and press the Add SWC... button;
  5. enter the location of the component SWC, which should be [unzip location]/Client/Components/OpenSpace_Flex.swc;
  6. press OK in the Add SWC dialog;
  7. press OK to close the project properties dialog.

OpenSpace is now available in your project. Create a new MXML application (or open an existing one), switch to Design view if necessary and drag the OpenSpace component from the OpenSpace folder in the Components panel to the stage.

For avatars implementation and other customizations you may also need to install the Flash component and the other add-ons described in the next section.

In Flash Builder 4, when the Flex SDK 4 or later is used, the following warning may be displayed when switching to the Design view: "Design mode could not load OpenSpace_Flex.swc. It may be incompatible with this SDK, or invalid. (DesignAssetLoader.CompleteTimeout)". This is a bug in Flash Builder that affects most swc files of other popular projects. Even if the OpenSpace component is not visible in design view, this does not affect the compilation or the project in any way.

OpenSpace Flash component

To use OpenSpace and its additional components (for example the AvatarLibrary) in Adobe Flash CS3 or later, double click on the OpenSpace_Flash.mxp file located at [unzip location]/Client/Components/OpenSpace_Flash.mxp. The Adobe Extension Manager will open, guiding you in the easy installation process.

OpenSpace is now available in Flash. Open Flash, create a new ActionScript 3 FLA file (or open an existing one) and drag the OpenSpace component from the OpenSpace 2 folder in the Components panel to the stage.

The initial version of Flash CS5 contained a bug preventing the correct installation of the OpenSpace component: after installing the MXP file using the Extension Manager as described above, you were not able to drag the component from the Components panel to the stage, or to the Library panel. This bug was fixed by the Flash development team, so make sure you install the latest version.

Besides the main OpenSpace component, the MXP package installs the following additional components, always located in the OpenSpace 2 folder of the Components panel:

OpenSpace Editor

Please read this document for the installation instructions of the OpenSpace Editor.

OpenSpace Extension

OpenSpace requires SmartFoxServer PRO (version 1.6.8 or higher) and a dedicated server-side extension to run. This is a Zone-level extension which takes care of loading and caching map and inventory data, send maps to clients, save maps modified by users at runtime, calculate avatar paths, etc. To install the OpenSpace Extension, follow these instructions:

  1. unzip the content of the file, located at [unzip location]/Server/, to the Server/ folder inside the SmartFoxServer PRO installation folder;
  2. using a text editor, open the (Mac OS X/Linux systems) or start.bat (Windows systems) file located in the Server/ folder;
  3. at the end of the list of JAR files, just before the closing double quotes, append the following:
    • Mac OS X/Linux » :openSpace/OpenSpaceExtension.jar (including the colon)
    • Windows » ;openSpace/OpenSpaceExtension.jar (including the semicolon)
  4. if you run SmartFoxServer as a service, open the wrapper.conf file located in the Server/conf/ folder and the following entry at the bottom of the list:
    • where XX is a progressive number with respect to the previous list entry;
  5. configure a Zone so that it makes use of the OpenSpace Extension (like in the provided examples - see next paragraph);
  6. stop SmartFoxServer if running, and restart it.

Developers can extend this class in order to add their own application logic to the core OpenSpace functionalities. Read this tutorial for more informations.

Running the examples

In order to run the examples provided in the downloaded package, under the [unzip location]/Examples/SmartFoxServerPRO/ folder, follow these instructions:

  1. install the OpenSpace Extension as described in the previous section of this document;
  2. make sure the data folder located at [SFS installation location]/Server/openSpace/data/ contains the example maps (this is the default condition when the OpenSpace Extension is installed);
  3. open the SmartFoxServer configuration file, and add the content of the zone_configuration.txt file to the <Zones> section — this configures the SmartFoxServer Zone and Rooms used by the examples;
  4. stop SmartFoxServer if running, and restart it; make sure no errors are thrown when the example Zone is initialized;
  5. install the examples:
    • Flash: simply unzip the file to a location of your choice;
    • Flex: in Flex Builder 3 (or later) open the File menu and choose Import > Flex Project...; locate the file and follow the instructions provided by Flex Builder.

When opening the FLA file provided in the file mentioned above (which was created using Flash CS4 and saved to be CS3-compatible), you might notice that at author-time the OpenSpace component is made of a black frame only (instead of the expected white background with the logo in the middle). To fix this, simply remove the component from the Library panel, drag a new instance on the stage from the Components panel and name it openSpace.