Question about array?

loadClip = function (mc) {
	speed = 3;
	loc = 0;
	with (mc) {
		_xscale = 0;
		_yscale = 0;
		_x = 0;
		_y = 0;
	}
};
myClips = new Array("fraL", "fraR", "fraT", "fraB");
for (i=0; i<myClips.length; i++) {
	mc = myClips*;
	this.square.mc.onLoad = function() {
		loadClip(this);
		//trace (mc);
	};
}

dear members, I need some help-

The above mentioned code doesn’t work. In arraying, [COLOR=Red]is it possible to put the names of movie clips into Array,movie clips that I have in stage, and call them for a common function?[/COLOR]
eg. fraL, fraR, fraT, fraB are four movie clips on stage.
I put them in array and called them with “mc”.onLoad as function. This didn’t work. loadClip is another function that I am using for setting properties.

I was trying to apply the similar functions called with for Loop…
Please help me out

:huh:

Hello,

well… onload event will not work properly for your specific case.
You can use next code instead yours

loadClip = function (mc) {
 speed = 3;
 loc = 0;
 trace(mc);
 with (mc) {
  _xscale = 0;
  _yscale = 0;
  _x = 0;
  _y = 0;
 }
};
myClips = new Array("fraL", "fraR", "fraT", "fraB");
for (i=0; i<myClips.length; i++) {
 mc = myClips*;
 with(this.square.mc)
  loadClip(mc);
  //trace (mc);
 };
}

just try it :wink: