开发者

How do I solve this?

This is my code: http://pastie.org/1795351

I want this code to be able to remove af or bf if its touching ground. But I can't do that because "cant define property of bf" and af.

And I need to have it outside the other functions because I will have alot of code otherwise.

if(bf || af.hitTestObject(Baske开发者_如何转开发t)){
removeChild(bf || af);
}


function checkGroundHit(object Sprite):void
{
    if (ground.hitTest(object))
    {
         object.parent.removeChild(object);
    }
}

checkBasketHit(af);
checkBasketHit(bf);

I see no ground in your code to test against, maybe you missed it?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜