# App Lab on even click button

**URL:** <https://forum.code.org/t/app-lab-on-even-click-button/39795>\
**Category:** CS Principles\
**Tags:** applab\
**Created:** [September 12, 2024, 3:41pm UTC](https://forum.code.org/t/app-lab-on-even-click-button/39795 "2024-09-12T15:41:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwalsh1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@jwalsh1](https://forum.code.org/u/jwalsh1)\
**Post date:** [September 12, 2024, 3:41pm UTC](https://forum.code.org/t/app-lab-on-even-click-button/39795/1 "2024-09-12T15:41:31Z")

</div>

Hi. I’m not great at coding but trying. My students are using app lab. Specifically " Event Driven Programming in app lab". We are at a point where they click a button it would move around the screen and when the screen is clicked it goes to ‘game over’ screen but now when they click the button it registers that the screen was also clicked and goes to game over screen. What am I missing? Or how can I fix it so it works the way we want? Thank you!  
Here is a very simple example of what I am talking about.

> **[Check out what I made](https://studio.code.org/projects/applab/1F7gRM_IQdW9cCjOJ3UMPPb3zTJYE6O6dpADm0oe0nE)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![bhatnagars](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bhatnagars/32/4919_2.png) [@bhatnagars](https://forum.code.org/u/bhatnagars)\
**Post date:** [September 13, 2024, 2:31am UTC](https://forum.code.org/t/app-lab-on-even-click-button/39795/2 "2024-09-13T02:31:35Z")

</div>

Since the button is a screen element, clicking on the button also triggers the event of clicking on the screen. To overcome this, you can put an image in the background and put the button on top of the image. Change the onEvent for click on screen to click on the image. I modified your code to make it work using a image. You can find it [here](https://studio.code.org/projects/applab/MSda_PIk_xrdSsSt5XKAlNsz_eMnCVksWcOlKlshODI).

---

<div class="post-metadata">

**Author:** ![jwalsh1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@jwalsh1](https://forum.code.org/u/jwalsh1)\
**Post date:** [September 13, 2024, 12:37pm UTC](https://forum.code.org/t/app-lab-on-even-click-button/39795/3 "2024-09-13T12:37:28Z")

</div>

Ok thanks! That is what I kind of thought but was just making sure I wasn’t missing something else.  
Thanks again for your help!

---

<div class="post-metadata">

**Author:** ![jwalsh1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@jwalsh1](https://forum.code.org/u/jwalsh1)\
**Post date:** [September 13, 2024, 3:43pm UTC](https://forum.code.org/t/app-lab-on-even-click-button/39795/4 "2024-09-13T15:43:39Z")

</div>

Maybe you can help us with this one?  
He has a lot going on.  
Basically when you click on any of the strawberries they should move but they instead send you to the red"you lost"screen.  
I tried making a blue background to test it and it’s still not working.  
I apologize for the horrible naming of all the id’s!  
Let me know if you see the problem.  
Thank you!

[https://studio.code.org/projects/applab/zRAKlc4BNji9DVDqOjupZlzAiRTgAg6r8O0sE9mL4yc](https://studio.code.org/projects/applab/zRAKlc4BNji9DVDqOjupZlzAiRTgAg6r8O0sE9mL4yc)

---

<div class="post-metadata">

**Author:** ![jwalsh1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@jwalsh1](https://forum.code.org/u/jwalsh1)\
**Post date:** [September 13, 2024, 3:46pm UTC](https://forum.code.org/t/app-lab-on-even-click-button/39795/5 "2024-09-13T15:46:32Z")

</div>

Never mind I think I figured it out!
