I took a look.
i don't know why you are using onclip event handlers, why not just use the on release to test if the drag clip hits the target ?
here a streamlined version of your code where I've used a function and parameters to test both clips hitting their respective targets:
Code:
//function in main timeline
function dropMe (clip, target) {
stopDrag ();
// tests whether drag clip hit it's target
if (clip._dropTarget == target) {
//set x and y co-ordinates of drag clip to it's target if it hit it
clip._x = eval(target)._x;
clip._y = eval(target)._y;
// stop the drag clip from being dragged away from it's target
clip.onTarget = true;
}
}
NO code on b1 MC but code has been changed on it's button :
Code:
on (press) {
// if this clip is not on it's target enable drag
if (!OnTarget) {
startDrag ("");
}
}
on (release) {
//call function in parent timeline - target clip is second paramter in brackets "/b"
_parent.dropMe(this, "/b");
}
and on the button within A1
Code:
on (press) {
// if this clip is not on it's target enable drag
if (!OnTarget) {
startDrag ("");
}
}
on (release) {
//call function in parent timeline - target clip is second paramter in brackets "/a"
_parent.dropMe(this, "/a");
}
[Edited by swampy on 03-08-2002 at 10:12 AM]