# Drag and drop

**URL:** https://forum.kirupa.com/t/drag-and-drop/57940
**Category:** Uncategorized
**Created:** [July 18, 2004, 12:57am UTC](https://forum.kirupa.com/t/drag-and-drop/57940 "2004-07-18T00:57:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![abraxas](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@abraxas](https://forum.kirupa.com/u/abraxas)
#### Post date: [July 18, 2004, 12:57am UTC](https://forum.kirupa.com/t/drag-and-drop/57940/1 "2004-07-18T00:57:12Z")

</div>

Hello!

I need help with drag and drop functions. I have done a animation like a windows window that i want to do so i can drag and drop it. I think the window should have a code like this:

[color=blue]**on (press) {**[/color]  
[color=blue]**tellTarget(“Fonster”){**[/color]  
[color=blue]**gotoAndPlay(“1drag”)**[/color]  
[color=blue] **}** [/color]  
[color=blue]**startDrag ("\_root.Fonster");**[/color]  
[color=blue] **}** [/color]

[color=blue]**on (release) {**[/color]  
[color=blue]**tellTarget(“Fonster”){**[/color]  
[color=blue]**gotoAndPlay(“1drop”)**[/color]  
[color=blue] **}** [/color]  
[color=blue]**stopDrag ("\_root.Fonster");**[/color]  
[color=blue] **}** [/color]

[left][color=red]::The tellTarget i have in the code is an effect::[/color][/left]  
But it aint working. Someone know what the problem is?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 2:29am UTC](https://forum.kirupa.com/t/drag-and-drop/57940/2 "2004-07-18T02:29:31Z")

</div>

on (press) {  
\_root.Fonster.gotoAndPlay(“1drag”);  
\_root.Fonster.startDrag ();  
}

on (release) {  
\_root.Fonster.gotoAndPlay(“1drop”);  
stopDrag ();  
}

that should work… tellTarget has been depricated since flash 5 try to avoid using it when you can.  
Good Luck

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 11:39pm UTC](https://forum.kirupa.com/t/drag-and-drop/57940/3 "2004-07-18T23:39:43Z")

</div>

thx 😃 its working!
