Mira esté es un ej. que viene en la ayuda de flash quisas te ayude a encontrar tu respuesta
Código ActionScript :
this.createEmptyMovieClip("canvas_mc", this.getNextHighestDepth());
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
this.origX = _xmouse;
this.origY = _ymouse;
};
mouseListener.onMouseUp = function() {
this.newX = _xmouse;
this.newY = _ymouse;
var minY = Math.min(this.origY, this.newY);
var nextDepth:Number = canvas_mc.getNextHighestDepth();
var line_mc:MovieClip = canvas_mc.createEmptyMovieClip("line"+nextDepth+"_mc", nextDepth);
line_mc.moveTo(this.origX, this.origY);
line_mc.lineStyle(2, 0x000000, 100);
line_mc.lineTo(this.newX, this.newY);
var hypLen:Number = Math.sqrt(Math.pow(line_mc._width, 2)+Math.pow(line_mc._height, 2));
line_mc.createTextField("length"+nextDepth+"_txt", canvas_mc.getNextHighestDepth(), this.origX, this.origY-22, 100, 22);
line_mc['length'+nextDepth+'_txt'].text = Math.round(hypLen) +" pixels";
};
Mouse.addListener(mouseListener);