I don't understand why I am getting an error 1009
this is the code :
function checkShoot():void
{
if (player.isShooting == true)
{
var bullet:Bullet = new Bullet(player.x,player.y,player.playerDir);
stage.addChild(bullet);
trace(player.playerDir);
player.isShooting = false;
}
}
function frameHandler(e:Event):void
{
if (platform.hitTestPoint(bullet.x + 31,bullet.y,true)) //it says the error is coming from here
{
trace("HIT PLATFORM:" + counter);
counter++;
}
I don't understand why this error is occurring. Please help me.
