_root.brushcursor.swapDepths(12) ;
This just uses swapDepths to make sure that the brush cursor is set at a depth level well above anything else that we might create, so that nothing overlaps and conceals it.
_root.createEmptyMovieClip(drawing,0) ;
createEmptyMovieClip is a function that, as the name implies, creates an empty movie clip on the stage. You can use it inside an onClipEvent handler or several other handlers; in this case weve just assigned it to the Actions of the first frame of the movie so that the movie clip is created the moment that it loads. The parameters of createEmptyMovieClip are the instance name and depth; specify the instance name inside quotes, and the depth as an integer to determine its stacking order with other objects in the movie.
Were using this as a container for our drawings. Everything thats drawn at depth 0 using the brush tool or any other tool will be created inside this empty movie clip.
_root.onMouseUp = function() {
_root.onMouseMove = stoppit;
}
This is a listener; a listener listens for specified mouse actions at the root level. This listener listens for the left mouse button to be released, and then performs the action inside the function. The currently specified action is to stop whatever is happening when the mouse is moving (such as painting) when the mouse button is released, so that it doesnt keep painting even when you stop dragging the depressed mouse cursor.


