Hi,
i am trying to create a drag and drop with a custom cursor: heres my code:
it works great until i try to add the custom cursors (last three functions) then the drop target fails to work! any ideas??
left_bar.sat_drag._alpha = 0;
left_bar.sat_drag.onPress = function() {
if (menuopen == true) {
hand_mc.nextFrame();
this.startDrag();
left_bar.sat_drag._alpha = 100;
hand_mc.nextFrame();
}
};
left_bar.sat_drag.onRelease = left_bar.sat_drag.onReleaseOutside=function () {
stopDrag();
if (this._droptarget == “/hit_area”) {
this.onTarget = true;
trace(“hit”);
this._x = -1;
this._y = 42;
left_bar.sat_drag._alpha = 0;
hand_mc.prevFrame();
} else {
this.onTarget = false;
Mouse.show();
hand_mc._visible = false;
this._x = -1;
this._y = 42;
left_bar.sat_drag._alpha = 0;
hand_mc.prevFrame();
}
};
left_bar.sat_drag.onMouseDown = function() {
//this variable tells us if the mouse is up or down
mousePressed = true;
};
left_bar.sat_drag.onMouseUp = function() {
mousePressed = false;
};
hand_mc.onEnterFrame = function() {
this._x = _xmouse;
this._y = _ymouse;
};
left_bar.sat_drag.onRollOver = function() {
Mouse.hide();
hand_mc._visible = true;
};
left_bar.sat_drag.onRollOut = function() {
Mouse.show();
hand_mc._visible = false;
};