ssCore.App.setBasePath

Specify the base path used to resolve relative paths in your Flash movie in commands like XML.load, loadMovie, loadMovieNum etc.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

path - New base path for resolving relative paths. You can pass in a path to any existing folder to use as the application base path. If you pass an empty string, the base path will be set to the application start directory (which is the default for SWF Studio). This parameter supports monikers.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.App.setBasePath( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.App.setBasePath( paramsObject );


Notes:

Being able to set the base path is helpful when the SWF files you want to use are kept in different directories. The default base path is the same as the directory where the application was started from so you don't need to do anything special to load external SWF files into your applications, they work just like regular Flash projectors in that respect.

A special value of 'V1' is available for compatibility with SWF Studio V1 where all relative references were to the application temporary directory (where SWF Studio extracted files from the layout).


Examples:

The following example changes the base path so that paths passed to native Flash load commands are relative to a directory called "special" that exists in the same directory from where our application is launched.

ssCore.App.setBasePath({path:"startdir://special"});