Hi,
you could use something like this,
code:
class ClassName extends MovieClip {
function ClassName() {
// use some methods inherited from MovieClip
// draw a line using the drawing API
this.lineStyle(1, 0x000000, 100);
this.moveTo(0, 0);
this.lineTo(100, 100);
}
}
you can now associate a movie clip with this class either using Object.registerClass (as in MX) or by filling in the AS2 class name field in the linkage properties for the clip,
code:
Object.registerClass("myClip", ClassName);
this.attachMovie("myClip", "myNewClip", 1); // myNewClip contains the line drawn using the drawing API