For...in event handlers

I’m currently just testing a few items in Flash. While I’m in this early stage, it’d be quite handy for this particular project if there were a way to assign events to every item in a certain MC (or on _root).

Here’s what I’ve done thus far:


for (movieClip in _root) {
	movieClip.onRollOver = function() {
		this.gotoAndStop(2);
	};
	movieClip.onRollOut = function() {
		this.gotoAndStop(1);
	};
	movieClip.onPress = function() {
		this.gotoAndStop(3);
	};
	movieClip.onRelease = movieClip.onReleaseOutside=function () {
		this.gotoAndStop(1);
	};
}

If I trace I can clearly see the instance names of the MCs (which means it works – sort of), but no matter what I’ve tried I can’t get the events to bind to the on-stage MCs.

Any / all help would be wonderful, though I’m not holding my breath on this even being possible at this point.