I have a hittest function for 14 objects, but now I would like to decrease the 14 objects to 12 without losing the 14 objects function. Is there a way to have a perimeter for the objects. The code are attached as below.
function HitTest(e:MouseEvent) {
var choarr:Array=new Array(null,cho1,cho2,cho3,cho4,cho5,cho6,cho7,cho8,cho9,cho10,cho11,
cho12,cho13,cho14);
for (var i:int = 1; i<=14; i++) {
var str_i:String=String(i);
if (e.currentTarget.hitTestObject(choarr*)) {
if (contain(str_i,select)==1) {
playsele.push(str_i);
select=select.removeValue(i);
trace(select);
trace(playsele);
e.currentTarget.stopDrag();
e.currentTarget.mouseEnabled=false;
player=false;
turncheck();
} else {
e.currentTarget.startDrag();
}
}
}
}