Help! Convert simple Flash AS2 code to AS3

Hi everyone,
I’m a Flash beginner and followed a tutorial: http://www.webwasp.co.uk/tutorials/018/tutorial.php … to learn how to make a “live paint/draw” effect. I didn’t realize that if I made something in AS2, I wouldn’t be able to embed it (and have it work) into my root AS3 file, where I’ve got a bunch of other stuff going on. I’ve tried following tips on how to change AS2 code to AS3, but it just doesn’t work. I know it’s simple code, and that some genius out there can figure it out, but I’m at a loss. Please help!

_root.createEmptyMovieClip("myLine", 0);

_root.onMouseDown = function() {
   myLine.moveTo(_xmouse, _ymouse);
   ranWidth = Math.round((Math.random() * 10)+2);
   myLine.lineStyle(ranWidth, 0xff0000, 100);
   _root.onMouseMove = function() {
      myLine.lineTo(_xmouse, _ymouse);
   }
}

_root.onMouseUp = function() {
   _root.onMouseMove = noLine;
}


Thanks in advance!
Signed,

Nicolle
Flash Desperado