ganalon
06-16-2005, 09:56 PM
I think I may be missing the boat when it comes to OOP and listeners and objects.
I want to be able under certain circumstances to drag the parent clip around but at other times I want to be able to drag its children.
As soon as I set the listener for the parent I can never remove it to go back to move the child around. I have a brain cloud.
source: http://www.herlihyracing.com/drag.fla
####### code
swapmodes();
function changemodes() {
if (mymode) {
mymode = false;
swapmodes();
} else {
mymode = true;
swapmodes();
}
}
function swapmodes() {
if (mymode) {
titanic.onPress = function() {
startDrag(this);
};
titanic.onRelease = function() {
stopDrag();
};
} else {
titanic.onPress.close()
titanic.kate.onPress = function() {
startDrag(this);
};
titanic.kate.onRelease = function() {
stopDrag();
};
}
}
I want to be able under certain circumstances to drag the parent clip around but at other times I want to be able to drag its children.
As soon as I set the listener for the parent I can never remove it to go back to move the child around. I have a brain cloud.
source: http://www.herlihyracing.com/drag.fla
####### code
swapmodes();
function changemodes() {
if (mymode) {
mymode = false;
swapmodes();
} else {
mymode = true;
swapmodes();
}
}
function swapmodes() {
if (mymode) {
titanic.onPress = function() {
startDrag(this);
};
titanic.onRelease = function() {
stopDrag();
};
} else {
titanic.onPress.close()
titanic.kate.onPress = function() {
startDrag(this);
};
titanic.kate.onRelease = function() {
stopDrag();
};
}
}