# mouseMoved()

## Example

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FH9BnGwUNRmtXXxYLR4G2%2Fmousemoved.gif?alt=media&#x26;token=f64cfa80-5384-44ba-84fe-98bc4e2fb835" alt=""><figcaption></figcaption></figure>

## Syntax

```
def mouseMoved():
    # do stuff
```

<details>

<summary>Full Code Example</summary>

```python
def setup():
  createCanvas(300,300)

show = False

def draw():
  global show
  background(255, 79, 132)
  fill(255, 164, 28)
  stroke(44, 129, 237)
  strokeWeight(10)

  if show:
    circle(150, 150, 150)
  show = False

def mouseMoved():
  global show
  show = True
```

</details>

## Description

This function is called every time the **mouse moves** and **none** of the mouse buttons is pressed.

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
