# Drag and drop

**URL:** https://forum.kirupa.com/t/drag-and-drop/28988
**Category:** Uncategorized
**Created:** [August 20, 2003, 9:15pm UTC](https://forum.kirupa.com/t/drag-and-drop/28988 "2003-08-20T21:15:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vealchop](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vealchop](https://forum.kirupa.com/u/vealchop)
#### Post date: [August 20, 2003, 9:15pm UTC](https://forum.kirupa.com/t/drag-and-drop/28988/1 "2003-08-20T21:15:15Z")

</div>

ok…

I’m trying to use drag and drop in conjunction with loading external .swf’s, i.e. when I drag an object to the target and drop it, an swf will pop up in a designated area. How can I modify the drag and drop code used in the example([http://www.kirupa.com/developer/actionscript/dragdrop.htm](http://www.kirupa.com/developer/actionscript/dragdrop.htm)) in order to do this? Also, how would I unload the movie when it’s finished playing?

I know that in the example when the user drops the yellow paintbrush onto the computer, the code tells it to go to the “yellow” frame label in the computer’s timeline. can I modify this statement to make the result anything I want (like loadMovie??)

I’m new at this…

Thank you!!!

---

<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: [August 20, 2003, 9:26pm UTC](https://forum.kirupa.com/t/drag-and-drop/28988/2 "2003-08-20T21:26:44Z")

</div>

to Unload it once it’s done playing:  
in the last frame [AS]this.unloadMovie();[/AS]

do you have an FLA that you have started?

---

<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: [August 20, 2003, 9:35pm UTC](https://forum.kirupa.com/t/drag-and-drop/28988/3 "2003-08-20T21:35:35Z")

</div>

Something like this:[AS]on (press) {  
startDrag ("\_root.yellow");  
}  
on (release) {  
stopDrag ();  
if (\_root.yellow.\_droptarget == “/computer”) {  
//choose one of the following options  
loadMovieNum(“yourmovie.swf”,1000);//if you want to load into level  
container\_mc.loadMovie(“yourmovie.swf”);//if you want to load into a empty movie clip  
}  
}  
[/AS]

---

<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: [August 21, 2003, 1:08pm UTC](https://forum.kirupa.com/t/drag-and-drop/28988/4 "2003-08-21T13:08:19Z")

</div>

Thanks for your help!!! Very much appreciated! This site is great!
