2007/6/21

碰撞測試

A.hitTest(B);
測試A是否碰撞到B。
其中B與A的關系要弄清楚,如_root.B的注澺


ex:

area.onEnterFrame=function()
{
if(this.hitTest(this._parent.cube))
trace("hit");
}

沒有留言: