What's New in Director 8.5 > Multiuser Server-Side Scripting > About server-side scripting

 

About server-side scripting

The server uses three files to set up its server-side scripting environment: the LingoVM Xtra, found in the server's xtras folder, and the Dispatcher.ls and Scriptmap.ls script files, found in the server's scripts folder. In order for server-side scripting to function, these files must be present in the scripts folder when the server starts up.

During startup, the server loads the LingoVM Xtra, which in turn reads the Dispatcher.ls file and converts its contents to a running server script. This Dispatcher script then loads the Scriptmap.ls file and converts it to a running server-side script as well.

The Dispatcher script contains some handlers that are required for server-side scripting and some that are useful but not mandatory. The required handlers are on initialize, on configCommand, on serverEvent, and on incomingMessage. You may choose to edit the Dispatcher.ls file to customize its functionality, but these four handlers must be present.