# Getting the pressed movieclip in an array

**URL:** <https://forum.kirupa.com/t/getting-the-pressed-movieclip-in-an-array/94908>\
**Category:** Uncategorized\
**Created:** [November 18, 2003, 10:19am UTC](https://forum.kirupa.com/t/getting-the-pressed-movieclip-in-an-array/94908 "2003-11-18T10:19:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![excidium](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@excidium](https://forum.kirupa.com/u/excidium)\
**Post date:** [November 18, 2003, 10:19am UTC](https://forum.kirupa.com/t/getting-the-pressed-movieclip-in-an-array/94908/1 "2003-11-18T10:19:36Z")

</div>

Hi scripters!

I’ve got an problem with reading out an array, the array is filled with movieclips with each an different picture in it (php variable -an url).  
Basically what i want to do is get the pressed movieclip and use another method to change the \_xscale and \_yscale properties of the pressed movieclip (an picture) and then pass it back to the function brillenArray.onEnterFrame to change the values of that movieclip!(if there’s a faster way… i’m open for suggestions!)

Only thing what i now get is that either all of the pictures move or none…

[AS]  
brillenArray = new Array();  
for (var i = 0; i\<5; i++) {  
if (this[‘plaatje’+i] != undefined) {

```
		brillen = _root.brillen;
		brillen.createEmptyMovieClip("image"+i, i);
		brillen["image"+i].loadMovie(this["plaatje"+i]+".jpg", i);
		brillenArray* = brillen["image"+i];
		}
	}

```

\_root.onEnterFrame = function() {  
for (var br = 0; br\<=brillenArray.length; br++) {  
brillenArray[br].onPress = function() {

```
	this._xscale = 70;
			this._yscale =70;
			
	};
	brillenArray[br].onRelease = function() {
	};
	
	brillenArray.onEnterFrame = function() {
	}
}};

```

[/AS]

If i press one of the four pictures it does what i want to: THAT picture scales to 70. But how can i call this movieclip (the pressed one) from another method without using specified place in the array (like brillenArray[1])?

Hope someone knows a solution!

2 days staring on a problem, doesn’t really make my day… :crazy:
