if (newimg.hitTestPoint(hero.x, hero.y, true)) { eventHandler(newimg.id); } ... protected function eventHandler(id:int):void { trace(id); // id }