# Question about array?

**URL:** <https://forum.kirupa.com/t/question-about-array/57639>\
**Category:** Uncategorized\
**Created:** [July 14, 2004, 10:21pm UTC](https://forum.kirupa.com/t/question-about-array/57639 "2004-07-14T22:21:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rabi](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rabi](https://forum.kirupa.com/u/rabi)\
**Post date:** [July 14, 2004, 10:21pm UTC](https://forum.kirupa.com/t/question-about-array/57639/1 "2004-07-14T22:21:48Z")

</div>

```auto
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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 15, 2004, 6:35pm UTC](https://forum.kirupa.com/t/question-about-array/57639/2 "2004-07-15T18:35:01Z")

</div>

Hello,

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

```auto
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 😉
