# Drag and drop target in an imported SWF

**URL:** <https://forum.kirupa.com/t/drag-and-drop-target-in-an-imported-swf/187772>\
**Category:** Uncategorized\
**Created:** [May 2, 2006, 7:05am UTC](https://forum.kirupa.com/t/drag-and-drop-target-in-an-imported-swf/187772 "2006-05-02T07:05:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![D\_Wiz](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@D\_Wiz](https://forum.kirupa.com/u/D_Wiz)\
**Post date:** [May 2, 2006, 7:05am UTC](https://forum.kirupa.com/t/drag-and-drop-target-in-an-imported-swf/187772/1 "2006-05-02T07:05:58Z")

</div>

Hi All,  
I am in a bit of a bind here, I am doing a finals for my Flash class in college and our assignment is to make a portfolio that show cases our past work, well I had made an easter egg hunt SWF where object is to find eggs and drop them into a bucket, main use of action script is the drag and drop target, By itself the SWF runs just fine but when I try to import that swf by method LoadMovie ( I am loading all my shows externally) my drag and drop target breaks. I can drag the egg over to the bucket but it dont “drop” the intial code for the drag and drop is this  
code --\>  
on (press) {  
startDrag("");  
}  
on(release) {

stopDrag();  
if (eval(this.\_droptarget) == \_root.EasterBasket) {  
setProperty(this, \_visible, false)  
\_root.count --;  
tSound = new Sound(this);  
tSound.attachSound(“thump”);  
tSound.start(0,0);  
}  
}  
\<-- end code  
I have tried using the lockroot command to keep the timelines seperate but that didnt help, I changed the \_root.EasterBasket to this.\_parent.EasterBasket to get rid of root reference but that didnt work either. is there a better mousetrap out there that I can use for this drop and drag target that will work when it is imported to another SWF, I need help fast please, this project is due here pretty quick, thanks all, D-Wiz
