How to find out what number in an Array a particular element is?

Essentially I need the MC to know whereabouts in the Array it is :beam:

Say you pick a movieclip at random, and assign in a function, how do you find out what number in the Array it is and remove it from the array?

For example…

 
for(a=0; a<arrayInQuestion.length; a++) {
if(arrayInQuestion[a]!=this) {
if(dist>50) {
arrayInQuestion.splice(this, 1)
}
}
}

But of course, “this” doesn’t work, so I need to find out what number “this” is :slight_smile:

Of course, it would be easy to remove the MC that I am checking “this” for distance with, it would just be splicing array[a], but it’s “this” that I am just not sure how to splice.

Cheers,
Joe