What's New in Director 8.5 > Multiuser Server-Side Scripting > Adding server-side scripts > Distributing server events

 

Distributing server events

When a movie sends an event to the server, the server forwards the event to that movie's script object using the on distributeServerEvent handler in the Dispatcher script. These events include the following:

on movieCreate: the first user of the movie logging on to the server

on movieDelete: the last user of the movie logging off of the server

on userLogOn: a user logging on to the movie

on userLogOff: a user logging off of the movie

on groupCreate: a group being created (when the first user joins the group)

on groupDelete: a group being deleted (when the last user in a group leaves)

on groupJoin: a user joining a group

on groupLeave: a user leaving a group

on incomingMessage: a message sent to the movie's server-side script

on serverShutDown: the server is shutting down

custom events created by the Lingo author

Script files associated with movies may contain handlers for any of these events. These scripts may also contain custom handlers that can be called by specially formatted messages sent by the movie.