# Click handler to a group of Sprites

**URL:** <https://phaser.discourse.group/t/click-handler-to-a-group-of-sprites/4862>\
**Category:** Phaser 3\
**Created:** [January 13, 2020, 3:30pm UTC](https://phaser.discourse.group/t/click-handler-to-a-group-of-sprites/4862 "2020-01-13T15:30:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariffadhillah](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@ariffadhillah](https://phaser.discourse.group/u/ariffadhillah)\
**Post date:** [January 13, 2020, 3:30pm UTC](https://phaser.discourse.group/t/click-handler-to-a-group-of-sprites/4862/1 "2020-01-13T15:30:32Z")

</div>

how to bind a click handler to a group of Sprites?

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [January 13, 2020, 6:36pm UTC](https://phaser.discourse.group/t/click-handler-to-a-group-of-sprites/4862/2 "2020-01-13T18:36:10Z")

</div>

> [@Group of interactive objects (v3)](https://phaser.discourse.group/t/group-of-interactive-objects-v3/971):
>
> Here are two ways to make a group of interactive objects. This uses the hitArea and hitAreaCallback properties of the [GroupCreateConfig](https://photonstorm.github.io/phaser3-docs/global.html#GroupCreateConfig), in [createMultiple()](https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Group.html#createMultiple__anchor). Each group member will use a distinct hit area shape identical to the others, positioned on itself. This uses the [SetHitArea](https://photonstorm.github.io/phaser3-docs/Phaser.Actions.html#.SetHitArea__anchor) action. That action also takes hitArea and hitAreaCallback arguments, but you can omit them; in that case it works just like [setInteractive()](https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.GameObject.html#setInteractive__anchor) and uses each object’s texture frame as a hit area.

---

<div class="post-metadata">

**Author:** ![ariffadhillah](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@ariffadhillah](https://phaser.discourse.group/u/ariffadhillah)\
**Post date:** [January 14, 2020, 4:33am UTC](https://phaser.discourse.group/t/click-handler-to-a-group-of-sprites/4862/3 "2020-01-14T04:33:25Z")

</div>

thank you, sir, I will learn it,

but sir, what if we only want only to bind, click handler to an individual isolated Sprite?"

but are there other in-depth examples, which lead me there, I’m still confused about how to use it, I’m still a beginner in phaser 3

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [January 14, 2020, 6:16am UTC](https://phaser.discourse.group/t/click-handler-to-a-group-of-sprites/4862/4 "2020-01-14T06:16:34Z")

</div>

[http://labs.phaser.io/edit.html?src=src\input\game%20object\on%20down%20event.js](http://labs.phaser.io/edit.html?src=src%5Cinput%5Cgame%20object%5Con%20down%20event.js)

---

<div class="post-metadata">

**Author:** ![ariffadhillah](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@ariffadhillah](https://phaser.discourse.group/u/ariffadhillah)\
**Post date:** [January 14, 2020, 6:28am UTC](https://phaser.discourse.group/t/click-handler-to-a-group-of-sprites/4862/5 "2020-01-14T06:28:21Z")

</div>

but, sir what if, just want to bind only a few sprites that can be clicked, I have a sprite isolated that is, there are some objects that can be clicked on, but I only want to bind to the handler click to an isolated Sprite, is there an example for this, sir, thank you very much, sir,
