我想问一下这个代码..
if (objek.dropTarget.parent.name == "book")
{
if ((objek == alif) || (objek == ba)){ //yg perlu diganti
//if (objek == objBenar){ //yg perlu diganti
objek.x = objek.dropTarget.parent.x;
objek.y = objek.dropTarget.parent.y + 50;
objek.removeEventListener(MouseEvent.MOUSE_DOWN, down);
objek.buttonMode = false;
var _loc_2:Number;
objek.scaleY = 0.4;
objek.scaleX = _loc_2;
objek.alpha = 0.6;
score+=5;
scorebox.text = "Score: " + score;
}
else {
objek.x = objek.dropTarget.parent.x;
objek.y = objek.dropTarget.parent.y + 50;
objek.removeEventListener(MouseEvent.MOUSE_DOWN, down);
objek.buttonMode = false;
var _loc_2:Number;
objek.scaleY = 0.4;
objek.scaleX = _loc_2;
objek.alpha = 0.6;
score-=2;
scorebox.text = "Score: " + score;}
}
}
我有movieclip alif、ba 和dal..这三个可以拖到名为“book”的movieclip 并且分数会改变。如果我将 alif 和 ba 电影剪辑拖到书上,分数会增加.. 如果我将 dal 电影剪辑拖到书上,分数会降低.. 如果我想制作一个数组的电影剪辑 alif 和 ba 怎么办?如何编写条件? ? 帮助 :(