I wanted to create a maze in flash AS3, with the user guiding the character. I tried using this (below) but this will require me to make all the maze walls individual and setting collision detection to each one. Is there an easier way of accomplishing the same thing?
monkey.addEventListener( Event.ENTER_FRAME, handleCollision)
function handleCollision( e:Event ):void
{
if(monkey.hitTestObject(wall))
{
trace("HIT");
}
else
{
trace("MISS");
}
}
You can use the Collision Detection Kit : https://code.google.com/p/collisiondetectionkit/