hey all,
i've got this code here, that allows the user of my movie to drag an object, here is the code for rectangle01 and rectangle02
rectangle01.onPress = function() {
this.startDrag(false);
updateAfterEvent();
};
rectangle01.onRelease = function() {
this.stopDrag();
};
rectangle02.onPress = function() {
this.startDrag(false);
updateAfterEvent();
};
rectangle02.onRelease = function() {
this.stopDrag();
};
the thing is... i plan on having around 100 objects... and i really don't want to write individual drag code for each one...
is there a code that, instead of, for example "rectangle02.onPress = function()", starts with something like "CURRENTOBJECT.onPress = function()" so it will drag the current selected object?