0

I'm having issues with a program I've been working on

function checkForHit(baddie:Baddie):void
{
for (var i:int = 0; i < bullets.length; i++)
{
    if (baddie.hitTestPoint(bullets[i].x,bullets[i].y,true))
    {
        removeChild(baddie);
        removeChild(bullets[i]);
        baddies.splice(baddies.indexOf(baddie), 1);
        bullets.splice(bullets[i]);
        updateScore(100);
        killCounter +=  1;
        checkKillCounter();
    }
}
}

I get Level 1, Layer 'Actions', Frame 1, Line 165 1046: Type was not found or was not a compile-time constant: Baddie.

I can figure out why. I tried declaring it but that didn't seem to work

Also, it seems to work in another program that a friend did, his seemed to work fine

0 Answers0