give your top ball an instance name topball and your bottom ball an instance name bottomball then the following should do it:
Code:
var xPos:Number = topball._x;
var draggableDistance:Number = 100;
drawLine();
topball.onPress = function():Void{
this.startDrag(true, this._x, this._y, xPos+draggableDistance, this._y);
this.onEnterFrame = function():Void{
drawLine();
}
}
topball.onRelease = function():Void{
this.stopDrag();
delete this.onEnterframe;
}
topball.onReleaseOutside = topball.onRelease;
function drawLine():Void{
clear();
_root.lineStyle(1,0,100);
_root.moveTo(bottomball._x, bottomball._y);
_root.lineTo(topball._x, topball._y);
}
edit
ops just read wattsup now was gonna do it... sorry never meant to hijack ur thread