Drag and Drop with targets

Hello,
I have decided to make a new thread since my problem changed and it was unclear.


Ok, in my file there is a movie clip and inside there is a bar, a hide and show button and a widget.
This is basically what i want to achieve:

  1. When clicking the hide/show button if the widget is touching the bar it should hide to, if it isn’t touching the bar it should stay as it was.
    2)If the widget is touching the bar the widget should to the frame “small” if it touches the background it should go to the frame “big”.

What i have tried:
1)For the widget to hide when it is touching the bar and i press the hide/show button:
if this root.bar gotoandplay (“hide”);

2)For the widget to go the frame “small” if it touches the bar and if it touches the background it should go to the frame “big”. :
on (press) {
startDrag("_root.clock");
}
on (release) {
stopDrag();
if (_root.clock._droptarget == “/background”) {
this.gotoAndStop(“big”);
}
}
on (press) {
startDrag("_root.clock");
}
on (release) {
stopDrag();
if (_root.clock._droptarget == “/bar”) {
this.gotoAndStop(“small”);
}
}


Forgot to tell that in the widget in my file i didn’t put that script because it didn’t work.


Tell me if by any way i am not being clear.
Answer soon please.
Regards,
Ilikemyself