A callback function is one that is not invoked explicitly by the programmer; rather the responsibility for its invocation is delegated to another function that receives the callback function's reference and instructions as to when to run the callback function.
Ouch! ...one might say. But not really.
It is the basis (sort-of) for understanding events: when this happens, do whatever is in this function.
In this fade in/out example, we may want to fade an image in and then do something else like start several place effects for other movie components. Or fade one image out and immediately fade another image in.
Not to get carried away, lets start simple and say after the fade-in/out let's simply pop-up an alert box.
So first we define a CallBack function, say cbFunc, to generate a simple JavaScript alert to say, "Done..."
In SWiSH, I define functions in the onLoad code sections like