Scope Issue


I using this array to create rollover and rollout events for a bunch of movie clips, I only have one on my stage at the moment during testing.

When I rollover and out I see the trace but no animation, if I change for the movie clips instance name it works so its obviously something to do with how I am referencing the clips but I don’t know how to fix.

These clips are just on the stage not within another movie clip.

my code

//Button Actions
var buttonArray:Array =

function initSite():void
	for (var i:Number = 0; i < buttonArray.length; i++)
		MovieClip(buttonArray*).id = i;
		MovieClip(buttonArray*).buttonMode = true;
		MovieClip(buttonArray*).addEventListener(MouseEvent.MOUSE_OVER, btnOver, false, 0, true);
		MovieClip(buttonArray*).addEventListener(MouseEvent.MOUSE_OUT, btnOut, false, 0, true);

function btnOver (event:MouseEvent):void

function btnOut (event:MouseEvent):void