Okay, I don't know how to save for Flash 5 format, so I am just going to give you some instructions that worked for me. First, enter this code on the first frame under the "Control" layer:
ended = false
Okay, on the second frame, replace your code with this code:
numEnemy = 5;
if...