# Drag and drop speed

**URL:** <https://forum.kirupa.com/t/drag-and-drop-speed/138129>\
**Category:** Uncategorized\
**Created:** [February 20, 2005, 8:34am UTC](https://forum.kirupa.com/t/drag-and-drop-speed/138129 "2005-02-20T08:34:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cardjorg](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cardjorg](https://forum.kirupa.com/u/cardjorg)\
**Post date:** [February 20, 2005, 8:34am UTC](https://forum.kirupa.com/t/drag-and-drop-speed/138129/1 "2005-02-20T08:34:17Z")

</div>

Hi, I was wondering how can i do this:

I have a movie clip which is the “draggable” and the “target”  
when i dragg “draggable” to “target” it snapps to it and when “draggable” doesn’t touch "target it goes back to its original position but now  
what i want is the same but when “draggable” goes back to its original position I want it to go at a certain speed something like in this

> **[kirupaForum](https://forum.kirupa.com)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

(the swfs where taken somewhere in the forum they aren’t mine)

the code I have is:  
[AS]onClipEvent(load){  
iniX =getProperty(this,\_x);  
iniY =getProperty(this,\_y);  
}

on (press) {

startDrag(this);  
}  
on (release) {  
stopDrag();  
if (this.\_droptarget == “/one”) {  
setProperty(this, \_x, \_root.one.\_x);  
setProperty(this, \_y, \_root.one.\_y);  
} else if (this.\_droptarget == “/two”) {  
setProperty(this, \_x, \_root.two.\_x);  
setProperty(this, \_y, \_root.two.\_y);  
} else {  
setProperty(this, \_x, iniX);  
setProperty(this, \_y, iniY);  
}  
}  
[/AS]  
help is greately appreciated  
Thanks 🙂 :beam: 🙂
