# Problem with mouseY: I can’t bring animation to work

**URL:** https://discourse.processing.org/t/problem-with-mousey-i-can-t-bring-animation-to-work/17635
**Category:** Coding Questions
**Created:** [February 8, 2020, 5:59am UTC](https://discourse.processing.org/t/problem-with-mousey-i-can-t-bring-animation-to-work/17635 "2020-02-08T05:59:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nausheen](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nausheen](https://discourse.processing.org/u/nausheen)
#### Post date: [February 8, 2020, 5:59am UTC](https://discourse.processing.org/t/problem-with-mousey-i-can-t-bring-animation-to-work/17635/1 "2020-02-08T05:59:09Z")

</div>

I have used mouseY in my project but i cnt see any animation, there is no error on the console as well. Can someone please tell me the cases wherein mouseY is suppressed

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [February 8, 2020, 7:01am UTC](https://discourse.processing.org/t/problem-with-mousey-i-can-t-bring-animation-to-work/17635/2 "2020-02-08T07:01:11Z")

</div>

add behind a line

```auto
println(mouseX, mouseY);

```

and you see if the values change.

---

<div class="post-metadata">

### Author: ![nausheen](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nausheen](https://discourse.processing.org/u/nausheen)
#### Post date: [February 8, 2020, 7:45am UTC](https://discourse.processing.org/t/problem-with-mousey-i-can-t-bring-animation-to-work/17635/3 "2020-02-08T07:45:25Z")

</div>

Actually I have a rect(360,mouseY.10,70);  
i aint able to bring animation in y coordinte

---

<div class="post-metadata">

### Author: ![bucherjo](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@bucherjo](https://discourse.processing.org/u/bucherjo)
#### Post date: [February 8, 2020, 8:33am UTC](https://discourse.processing.org/t/problem-with-mousey-i-can-t-bring-animation-to-work/17635/4 "2020-02-08T08:33:55Z")

</div>

Hello nausheen  
The problem might be that “rect(360,mouseY,10,70)” isn’t int the void draw(){} section of your project and hence doesn’t get updated. Try the following code:

````auto
void setup(){
  size(500,500);
}

void draw(){
  background(255);
  fill(0);
  rect(360,mouseY,10,70);
}```
````

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [February 8, 2020, 2:59pm UTC](https://discourse.processing.org/t/problem-with-mousey-i-can-t-bring-animation-to-work/17635/5 "2020-02-08T14:59:50Z")

</div>

Hello,

Explore the resources here:  
[https://processing.org/](https://processing.org/)

The _Tutorials_ have a section on _Interactivity._  
The _Examples_ have mouse examples.  
There are _References_ for mouseX and mouseY.  
And lots more on the site to explore!

’ 🙂 ’
