Child Index

Hi

I have this swf file
http://www.qwerty-design.co.uk/bensons/forum.html

This will eventually be loads of these pins. I’m using the Pin head as a hit area to start the simple rollover animation.

I just want the the grey box that appears to allows be on top of all the pins. I’ve managed to get it to do this but then once I have it on top the other pins event handler doesn’t work.

Is there a way of storing the current index in a variable so I can return the movieclip to this on the rollout function?

Or is there a better way altogether? whilst keeping things simple?

My code so far


//Roll over and out button actions
var buttonArray:Array =
[
pin1_mc.hitMov_mc,
pin2_mc.hitMov_mc
];

function initSite():void
{
	for (var i:Number = 0; i < buttonArray.length; i++)
	{
		MovieClip(buttonArray*).buttonMode=true;
		MovieClip(buttonArray*).addEventListener(MouseEvent.ROLL_OVER, onOver, false, 0, true);
		MovieClip(buttonArray*).addEventListener(MouseEvent.ROLL_OUT, onOut, false, 0, true);
	}
}
initSite();


function onOver (event:MouseEvent):void
{
	event.currentTarget.parent.gotoAndPlay(2);
	this.setChildIndex(this.getChildByName(event.currentTarget.parent.name), this.numChildren-1);
}

function onOut (event:MouseEvent):void
{
	event.currentTarget.parent.gotoAndPlay(7);
}