# Please help - problem with dragndrop

**URL:** <https://forum.kirupa.com/t/please-help-problem-with-dragndrop/104816>\
**Category:** Uncategorized\
**Created:** [March 19, 2004, 7:29pm UTC](https://forum.kirupa.com/t/please-help-problem-with-dragndrop/104816 "2004-03-19T19:29:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scally](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@scally](https://forum.kirupa.com/u/scally)\
**Post date:** [March 19, 2004, 7:29pm UTC](https://forum.kirupa.com/t/please-help-problem-with-dragndrop/104816/1 "2004-03-19T19:29:50Z")

</div>

I’m trying to build a drag n drop -& I’ve read tuts here & elsewhere. Problem is that sometimes the incorrect messages are stored. I cant tie it down to anything & have rebuilt it several times from scratch. I’ve included a reduced version of the swf which displays the same behaviour. This is the main action script on the Mc for each resistor (obviously the values change)  
The problem can occur on any resistor & isn’t consistent. Most of the time it works ok but occasionally, a correct drop results in an incorrect message. I’d be really greatful if anyone could offer any ideas on this. Scally  
// when mc is pressed , drag it  
on(press) {  
startDrag(this);  
}  
// when mc is released stop dragging  
on(release) {  
stopDrag();  
// if its on the meter show resistance  
if (this.\_droptarget == “/meter”) {  
\_root.resistance=“901,635”;

```
									}
		
	
		}

```

//set resistance to blank on next drag  
on(press) {  
startDrag(this);  
\_root.resistance="";  
}  
// when mc is released stop dragging  
on(release) {  
stopDrag();  
// if over correct target store correct msg  
if (this.\_droptarget == “/10percent”) {  
\_root.answer1=“1M Ohm - correct Well done!”;

```
									}
		// if not over correct target, store wrong msg 
	else{
			_root.answer1 = "1M Ohm wrong - check explanation";
				}
		}:puzzle:
```
