Need help with scripting my platformer game

Hey!

Ok, so I have my player, I have my enemy, and I want to make it so that when I hit “A”, the player attacks and if its close enough to the enemy, the enemy dies. I’ve found how to do this in AS2, but not AS3. Any suggestions? Thank you! :mario: