if (newimg.hitTestPoint(hero.x, hero.y, true)) { newimg.dispatchEvent( /* тут можно какое-нибудь свое событие определить */ ); }