createEmptyMovieClip("line_mc",1); line_mc.lineStyle(1, 0x006699, 100); onMouseDown = function () { detect = 1; startX = _xmouse; startY = _ymouse; line_mc.moveTo(startX, startY); }; onMouseMove = function () { if (detect == 1) { line_mc.lineTo(_xmouse, _ymouse); updateAfterEvent(); } }; onMouseUp = function () { detect = 0; };