You can then replace the following:
- if(hitTestObject(target))
- {
- visible = false;
- target.alpha = 1;
- Object(parent).match();
- }
with this:
- if(hitTestObject(evt.target))
- {
- visible = false;
- evt.target.alpha = 1;
- Object(parent).match();
- }
I didn't understand why you've kept target as a member variable in that case though. I do not have the full context here, probably you have missed the assignment to target before the drop event. Just double check. In that case, the change I mentioned above will not be required.
-Dharmendra.