# Dragable line - vector rope instead of simple line

**URL:** <https://forum.kirupa.com/t/dragable-line-vector-rope-instead-of-simple-line/329457>\
**Category:** flash\
**Created:** [August 31, 2012, 9:15am UTC](https://forum.kirupa.com/t/dragable-line-vector-rope-instead-of-simple-line/329457 "2012-08-31T09:15:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robisklp](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@robisklp](https://forum.kirupa.com/u/robisklp)\
**Post date:** [August 31, 2012, 9:15am UTC](https://forum.kirupa.com/t/dragable-line-vector-rope-instead-of-simple-line/329457/1 "2012-08-31T09:15:09Z")

</div>

Hi,

I want to make a dragable rope instead of simple line with actionscript.

Here’s my current animation:  
wwwdotgreatvectorsdotcom/temp/banner-2.html

Here’s the code that i use to get moving line:

///////////////////////////////////////////////  
this.onEnterFrame=function(){  
drawLine(sponge\_mc);  
}

function drawLine(target\_mc:MovieClip){  
\_root.createEmptyMovieClip(“line\_mc”, 0);  
line\_mc.lineStyle(1,0x000000,100);  
line\_mc.moveTo(target\_mc.\_x+50,target\_mc.\_y+50);  
line\_mc.lineTo(570,0);  
}  
///////////////////////////////////////////////

I want this line to be replaced with my own object - vector rope and distort it when i move the object that is connected to one point of it.  
Please let me know if this is possible and how to do it.  
At least a technique to achieve this?
