mercredi 29 mars 2017

TypeError: Error #1009: Cannot access a property or method of a null object reference. For My PAP

TypeError: Error #1009: Cannot access a property or method of a null object reference. at obstaculo_fla::MainTimeline/handleCollision()[obstaculo_fla.MainTimeline::frame9:55]

TypeError: Error #1009: Cannot access a property or method of a null object reference. at obstaculo_fla::MainTimeline/handleCollision_final()[obstaculo_fla.MainTimeline::frame367:18]

player.addEventListener( Event.ENTER_FRAME, handleCollision_final)

function handleCollision_final( e:Event ):void
{
if(player.hitTestObject(nextum))
   {
       gotoAndPlay(368);
   }
   else
   {
       trace("MISS");
   }
} 

player.addEventListener( Event.ENTER_FRAME, handleCollision)

function handleCollision( e:Event ):void
{
if(player.hitTestObject(wall))
   {
       player.y-=20;
       gotoAndPlay(6);
   }
   else
   {
       trace("MISS");
   }
} 

Thank You

Aucun commentaire:

Enregistrer un commentaire