Do you know what causes this error? TypeError: Error #1006: setChildIndex is not a function. at Function/()[iVision_Game_fla.MainTimeline::frame83:151]
Here's where I think the error occurs...
function dragObject(indx1:int,indx2:int):Function {
return function(event:MouseEvent){
var item:MovieClip=MovieClip(event.currentTarget);
item.startDrag();
var topPos:uint=this.numChildren-1;
var itemSound:Sound = new Sound();
itemSound.load(new URLRequest("sounds/"+dirArray[indx1])+indx2+".mp3"));
if(!activeSound)
{
itemSound.play();
activeSound=true;
}
this.setChildIndex(item, topPos);
}
}
//calling it on another function
var functionOnDrag:Function = dragObject(indexc[count-1],index[count2]);
pb[i].addEventListener(MouseEvent.MOUSE_DOWN,functionOnDrag);