Scripts allow programming of interactive applications that react on user input. Behavior - a script that has been attached to a sprite and that defines functions for events that the sprite may receive and act upon. Event - an event or message is the way how communication within Director works. One can send a message to a certain sprite or to the movie itself. If the sprite has a behavior associated with this message, this behavior function gets executed.
User input is translated into events as well.
Among the periodic events generated by Director are PrepareFrame , StartFrame , EndFrame . Cast files contain the data of up to 1000 casts. Cast files can be described as libraries of Director objects which can be used in a movie. The reason that Director allows separate cast libraries outside the movie file is to make sharing common casts among movies possible. Let us assume that our movie does not contain any scripts or behaviors.