Ok, so I grabbed a droptarget file from some tutorial, and ended up mixing it with another one, currently this script works, but I want to know how to change one part of it, as you can see below the red colored “/rclip/dropone”. Those are four movie clips inside of a movie clip that is called rclip, on the main stage.
now, if I am correct that is old flash4/5 (pre dot) syntax, which is fine, cause it works, but I wanted to change it to dot syntax. For some reason that won’t work.
I have tried many different variations using _parent, and _root. neither of which work. is there something I am missing, inside of this script that wouldn’t allow me to use dot syntax right there?
on (press) {
parent.drag_2.swapDepths( "root.drag" + _parent.highest );
_parent.highest = substring ( _name, 6, 1 );
var xx = _parent.drag_2._x;
var yy = _parent.drag_2._y;
startDrag (“_parent.drag_2”);
}
on (release) {
stopDrag ();
if (_parent.drag_2._droptarget == [COLOR=red]“/rclip/dropone”[/COLOR]) {
_parent.drag_2._x = _parent.dropone._x;
_parent.drag_2._y = _parent.dropone._y;
_parent.var_one = “S”
} else if (_parent.drag_2._droptarget == [COLOR=red]"/rclip/droptwo"[/COLOR]) {
_parent.drag_2._x = _parent.droptwo._x;
_parent.drag_2._y = _parent.droptwo._y;
_parent.var_two = "S"
} else if (_parent.drag_2._droptarget == [COLOR=red]"/rclip/dropthree"[/COLOR]") {
_parent.drag_2._x = _parent.dropthree._x;
_parent.drag_2._y = _parent.dropthree._y;
_parent.var_three = "S"
} else if (_parent.drag_2._droptarget ==[COLOR=red]"/rclip/dropfour"[/COLOR]) {
_parent.drag_2._x = _parent.dropfour._x;
_parent.drag_2._y = _parent.dropfour._y;
_parent.var_four = "S"
} else {
_parent.drag_2._x = xx;
_parent.drag_2._y = yy;
}
}