# How to create a opening flap or opening window?

**URL:** https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520
**Category:** Project Guidance
**Created:** [October 16, 2018, 5:11am UTC](https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520 "2018-10-16T05:11:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dennisreyes](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dennisreyes](https://discourse.processing.org/u/dennisreyes)
#### Post date: [October 16, 2018, 5:11am UTC](https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520/1 "2018-10-16T05:11:45Z")

</div>

Hello everyone, I’m stuck in a project right now and I wanted to create a flap that’ll reveal some images underneath.

It’s supposed to open when the user hovers is mouse on it yet I don’t know where and how to start.

---

<div class="post-metadata">

### Author: ![dan850](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dan850](https://discourse.processing.org/u/dan850)
#### Post date: [October 16, 2018, 6:20am UTC](https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520/2 "2018-10-16T06:20:04Z")

</div>

Hi, To get a better understanding, can you post a picture or video of what you hope to create? Or can you describe in more detail about your project Please?

---

<div class="post-metadata">

### Author: ![dennisreyes](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dennisreyes](https://discourse.processing.org/u/dennisreyes)
#### Post date: [October 16, 2018, 10:15pm UTC](https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520/3 "2018-10-16T22:15:35Z")

</div>

I don’t really have a video but I want to recreate a sort of miniature doll house that when a user clicks on a labelled part (e.g. bathroom) it opens up to reveal that room.

This is what I have so far. It’s still in progress and there’s no fill color for the objects so that I could see the coordinates.

![Untitled](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/32d3bcbf36a9699ea3565f26d9a7f27aeb2a8abe.jpeg)

---

<div class="post-metadata">

### Author: ![Eeyorelife](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@Eeyorelife](https://discourse.processing.org/u/Eeyorelife)
#### Post date: [October 17, 2018, 11:47am UTC](https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520/4 "2018-10-17T11:47:50Z")

</div>

Start by drawing something. For example a circle:

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

void draw(){
ellipse(200,200,50,50);
}

```

Now you have something to cover up. Try drawing a rectangle that covers the circle.

When you have done that you essentally have what you want. All you need now is to find a way to make the rectangle dissappear when the mouse is over the rectangle. Maybe you can use an if statement and the mouseX and mouseY variables? Chekc it out in the reference if you are not familiar with the functions
