Frame 1
this.attachMovie("cursor_id", "cursor_mc", this.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
Mouse.hide();
var mouseListener = new Object();
mouseListener.onMouseMove = function () {
pencil._x = _xmouse;
pencil._y = _ymouse;
updateAfterEvent();
};
Mouse.addListener(mouseListener);
this.createEmptyMovieClip("drawing_mc", this.getNextHighestDepth());
var mouseListener = new Object();
mouseListener.onMouseDown = function () {
this.drawing = true;
drawing_mc.moveTo(_xmouse, _ymouse);
drawing_mc.lineStyle(3, 0, 100);
};
mouseListener.onMouseUp = function () {
this.drawing = false;
};
mouseListener.onMouseMove = function () {
if (this.drawing) {
drawing_mc.lineTo(_xmouse, _ymouse);
}
updateAfterEvent();
};
Mouse.addListener(mouseListener);
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.isDown(46) || (Key.isDown(8))) {
drawing_mc.clear();
}
};
Key.addListener(keyListener);