# Redirect a correct \_dropTarget to New Frame

**URL:** <https://forum.kirupa.com/t/redirect-a-correct--droptarget-to-new-frame/64719>\
**Category:** Uncategorized\
**Created:** [September 19, 2004, 5:55am UTC](https://forum.kirupa.com/t/redirect-a-correct--droptarget-to-new-frame/64719 "2004-09-19T05:55:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mossie](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Mossie](https://forum.kirupa.com/u/Mossie)\
**Post date:** [September 19, 2004, 5:55am UTC](https://forum.kirupa.com/t/redirect-a-correct--droptarget-to-new-frame/64719/1 "2004-09-19T05:55:26Z")

</div>

Hi,

I’m trying - and failing to get a movie to advance to a new frame when one movie is correctly dragged over another movie.

The enclosed code roughly allows me to drag/drop/report drop location/ return to starting point if not dropped over an element…and thats about it.

The last thing I’d like it to do is to acknowledge the right answer by moving to a new frame. Any ideas?

Code follows…

onClipEvent (mouseDown) {  
xorigin = \_root.\_xmouse;  
yorigin = \_root.\_ymouse;  
if (this.hitTest (\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.startDrag();  
}  
}  
onClipEvent (mouseUp) {  
\_root.drop = \_droptarget; // sends the address of whatevers under the box to the text box (created as a dynamic text box)  
this.stopDrag();  
// this code returns the dragged object to the place it started if the object listed - apple, is not the right answer  
if (\_root.drop == “/apple”) {  
if (\_root.\_xmouse \> \_root.\_X) {  
this.\_x = xorigin;  
this.\_y = yorigin;  
}  
} else {  
this.\_x = eval (\_root.drop).\_x; //coverts string stored in droptarget to an object reference  
this.\_y = eval (\_root.drop).\_y; //coverts string stored in droptarget to an object reference

// the following code is where I’m looking for inspiration - when droptarget = /Lamb goto new frame(Yes) - it doesn’t.

if (\_root.drop == “/Lamb”) {  
root.lamb.gotoandstop(“Yes”);  
}

}  
}
