# Circle will become larger when mouse moves on it (loop question)

**URL:** https://discourse.processing.org/t/circle-will-become-larger-when-mouse-moves-on-it-loop-question/4231
**Category:** Coding Questions
**Created:** [October 7, 2018, 7:26pm UTC](https://discourse.processing.org/t/circle-will-become-larger-when-mouse-moves-on-it-loop-question/4231 "2018-10-07T19:26:37Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)
#### Post date: [October 7, 2018, 7:34pm UTC](https://discourse.processing.org/t/circle-will-become-larger-when-mouse-moves-on-it-loop-question/4231/2 "2018-10-07T19:34:30Z")

</div>

Hi xhqecho,

Can you please format your code? It is all explained in this thread: [Guidelines—Tips on Asking Questions](https://discourse.processing.org/t/guidelines-tips-on-asking-questions/2147)

The problem is that you are using a for loop to draw your shape but you are not having one to check the distance. So you are checking the distance with the last x value the for loop is giving you.

Consider using another loop to check the distance for each one of your circle.

---

_[View the full topic](https://discourse.processing.org/t/circle-will-become-larger-when-mouse-moves-on-it-loop-question/4231)._
