Quick question...
Where have you put the mouseMove handler? On the stack, card or object level?
It's likely that the 'target' is not what you may think it is. Probably best to modify that handler to do a
in place of what it currently does - just so you can monitor what the value of target is. If it changes to anything other than what you are expecting then you will have found the problem.
It's likely that you may need to check what the target name is and only do the intersect stuff, etc if it is one of the expected items.
I don't know the Sheepherder code at all, but I'm guessing that the clsSheep property is something that identifies a Sheep item. You might want to do the check for that before you do anything else with the target - ie put that before the 'set the loc...' line.
These are only some suggestions.
Regarding the execution of the script even while in edit mode - there are ways to detect edit mode and wrap your handler code in the detection stuff. I too am not a fan of having my code run while in edit mode, but I seem to be in the minority!!! Look for other, earlier, messages by me to see some of the answers that were given
If you persevere then you will slowly get used to it and will learn to "Save Often and Keep Calm", but most of all always save before running a test, and even when changing cards/stacks (in case an 'on openCard' handler fires and locks up LC) If script seems to cause a lock-up then you might be able to interrupt it via Cmd-. or Ctrl-. (. = Full stop/point/dot on the keyboard)
Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.