# Assigned numbers to movie clip to plug in formula... not working

**URL:** <https://forum.kirupa.com/t/assigned-numbers-to-movie-clip-to-plug-in-formula-not-working/329969>\
**Category:** flash\
**Created:** [November 13, 2012, 7:57am UTC](https://forum.kirupa.com/t/assigned-numbers-to-movie-clip-to-plug-in-formula-not-working/329969 "2012-11-13T07:57:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![na\_il](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@na\_il](https://forum.kirupa.com/u/na_il)\
**Post date:** [November 13, 2012, 7:57am UTC](https://forum.kirupa.com/t/assigned-numbers-to-movie-clip-to-plug-in-formula-not-working/329969/1 "2012-11-13T07:57:23Z")

</div>

So I am attempting to vertically evenly space these movie clips so I came up with a math formula involving n( the button number) but Its not working.

\*\*Here is my code:

\*\*var buttonArray:Array = [side\_banner.btn1, side\_banner.btn2, side\_banner.btn3, side\_banner.btn4];

```
var buttonCount:uint = buttonArray.length;

for (var i:uint=0; i&lt; buttonCount; i++) {
buttonArray*.addEventListener(MouseEvent.CLICK, outputNumber);
buttonArray*.theTrigger = [i + 1];

}

```

}

function outputNumber(e:MouseEvent):void {  
trace( e.target.theTrigger);  
buttonArray\*.y = (((stage.stageHeight - 400)/4)\*(e.target.theTrigger)) - ((stage.stageHeight - 400)/4)/2  
}

But apparently each movie clip doesn’t actually have a numerical value just a numeric name… how can I get the “n” btn number to use my formula?

Thanks
