I’ve been trying lots of different options to make this work, but nothing seems to work. I have a drag and drop interaction and I want the possible hit area (chart_mc.hit1) to change alpha when the user drags the selection (drag_mc) over it to indicate that they’re in the drop area…
Here’s the code I’m using and the .fla is attached…
var droppedIn = false;
drag_mc.onRelease = function() {
trace("this._droptarget "+this._droptarget);
this._x = 106;
this._y = 200;
droppedIn = true;
this.gotoAndStop(4);
stopDrag();
};
drag_mc.onPress = function() {
startDrag(this, true);
};
drag_mc.onRollOut = function() {
chart_mc.hit1._alpha = 15;
if (droppedIn == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(3);
}
};
drag_mc.onRollOver = function() {
if (droppedIn == false) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
};
drag_mc.onDragOver = function(){
trace("drag_mc.onDragOver "+this._droptarget);
if (this._droptarget == " /chart_mc/hit1") {
chart_mc.hit1._alpha = 60;
}
}
drag_mc.onDragOut = function(){
trace("drag_mc.onDragOut "+this._droptarget);
chart_mc.hit1._alpha = 15;
}
stop();
Thanks for any help!!