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: