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?
精彩评论