# PImage and Image switch

**URL:** https://discourse.processing.org/t/pimage-and-image-switch/36222
**Category:** Coding Questions
**Created:** [April 8, 2022, 8:57pm UTC](https://discourse.processing.org/t/pimage-and-image-switch/36222 "2022-04-08T20:57:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Parinaz](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@Parinaz](https://discourse.processing.org/u/Parinaz)
#### Post date: [April 8, 2022, 8:57pm UTC](https://discourse.processing.org/t/pimage-and-image-switch/36222/1 "2022-04-08T20:57:01Z")

</div>

> Dear  
> I want to create an atmosphere to generate an structure by switching colors, I wanted those layers to come in order and make that structure. However, when I press every key I designed In the keyPressed event for each layer, the previous layer vanishes. also, I wanted to draw them with a right-click but Not only cant I draw them by clicking but also layers vanished by the previous one I know the main problem goes back to drawing but I don’t know what should I do. May I kindly ask you to help me?

My work

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [April 8, 2022, 11:32pm UTC](https://discourse.processing.org/t/pimage-and-image-switch/36222/2 "2022-04-08T23:32:44Z")

</div>

Hi and welcome

Have you try something ??? Show us what you tried if you did

---

<div class="post-metadata">

### Author: ![Parinaz](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@Parinaz](https://discourse.processing.org/u/Parinaz)
#### Post date: [April 9, 2022, 5:06am UTC](https://discourse.processing.org/t/pimage-and-image-switch/36222/3 "2022-04-09T05:06:43Z")

</div>

Dear I sent my Google drive link.actualy I can put it here

[https://drive.google.com/file/d/1bnqkihgFEW\_X6PC\_mMVkh24ixrv0-juw/view?usp=drivesdk](https://drive.google.com/file/d/1bnqkihgFEW_X6PC_mMVkh24ixrv0-juw/view?usp=drivesdk)

Best,  
Parinaz
