i was wondering if it was possible to do the following scenario.
1. there's a movie clip with a input text box, having an instance name called "active". the text box in "active" can be selected.
2. if you click on a toggle button, the text box in "active" becomes unselectable and becomes drag and drop.
3. if the toggle button is clicked again, then the "active" movie clip is no longer able to be dragged and dropped and the text box in "active" becomes selectable again.
i've got #1 and #2 working, but i can't get #3 to work. once i click on the toggle button, "active" always has the capacity to be dragged an dropped.
here's the code i'm using on a frame for the "active" movie
function activateDrag() {
active.myText_txt.selectable = false;
activate = true;
if (activate) {
active.onPress = function() {
this.startDrag();
getName = this._name;
};
active.onRelease = function() {
this.stopDrag();
};
}
}
function deactiveDrag() {
activate = false;
active.myText_txt.selectable = true;
}
the toggle button will either call activateDrag() or deactiveDrag() depending on what state it's in. and i know it's being called properly.
i think there's something wrong with my activateDrag function because it doesn't seem to be able to stop the movie clip's ability to be drag and dropped.
any ideas?