# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=161

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 162

---

## [Hello i made some quiz and i can only change 2 page if anyone can show me how can ı reset the page](https://discourse.processing.org/t/hello-i-made-some-quiz-and-i-can-only-change-2-page-if-anyone-can-show-me-how-can-i-reset-the-page/26424)

<div class="topic-metadata">

**Author:** [@clay21](https://discourse.processing.org/u/clay21)\
**Replies:** 11\
**Last updated:** [December 21, 2020, 9:39pm UTC](https://discourse.processing.org/t/hello-i-made-some-quiz-and-i-can-only-change-2-page-if-anyone-can-show-me-how-can-i-reset-the-page/26424 "2020-12-21T21:39:27Z")

</div>

int page=0; void setup(){ size(800,600); page+=1; } void draw(){ switch(page){ case 1:drawPage1();break; case 2:drawPage2();break; case 3:drawPage3();break; case 4:drawPage4(); break; default:break; } } vo…

---

## [Creating a loading animation](https://discourse.processing.org/t/creating-a-loading-animation/26422)

<div class="topic-metadata">

**Author:** [@edumanilha](https://discourse.processing.org/u/edumanilha)\
**Replies:** 8\
**Last updated:** [December 21, 2020, 8:13pm UTC](https://discourse.processing.org/t/creating-a-loading-animation/26422 "2020-12-21T20:13:18Z")

</div>

I need help to make a loading bar…When i click the mouse over the button the message come with 100% and filled bar…How can I make it charge a percent after X seconds? And how I can go back to the buttons screens after …

---

## [How to check for a color in an area](https://discourse.processing.org/t/how-to-check-for-a-color-in-an-area/17616)

<div class="topic-metadata">

**Author:** [@Yannik](https://discourse.processing.org/u/Yannik)\
**Replies:** 10\
**Last updated:** [December 21, 2020, 5:01pm UTC](https://discourse.processing.org/t/how-to-check-for-a-color-in-an-area/17616 "2020-12-21T17:01:40Z")

</div>

How can I check, if there is a specific color in an area? Like: If(color in area(10,100,50,600) == color(0,0,255)){ run code }

---

## [Making the variables into arrays, just to make the code more optimal](https://discourse.processing.org/t/making-the-variables-into-arrays-just-to-make-the-code-more-optimal/26368)

<div class="topic-metadata">

**Author:** [@GoWithTheFloe](https://discourse.processing.org/u/GoWithTheFloe)\
**Replies:** 3\
**Last updated:** [December 21, 2020, 2:33pm UTC](https://discourse.processing.org/t/making-the-variables-into-arrays-just-to-make-the-code-more-optimal/26368 "2020-12-21T14:33:54Z")

</div>

Hello, I am a beginner and I am trying to make my code more optimal and look more professional. I have some variables that are called the same but they all end with the numbers 0,1, 2 and so on. I ask this question whil…

---

## [Need help with a simple animation](https://discourse.processing.org/t/need-help-with-a-simple-animation/26409)

<div class="topic-metadata">

**Author:** [@trelosti](https://discourse.processing.org/u/trelosti)\
**Replies:** 3\
**Last updated:** [December 21, 2020, 7:55am UTC](https://discourse.processing.org/t/need-help-with-a-simple-animation/26409 "2020-12-21T07:55:13Z")

</div>

Here is what I want to do: create a chain of circles (number of circles if defined by user input) that must zigzag and change direction of movement when reaching a boundaries of the screen. But I have problems with “sna…

---

## [How can i use external libraries? (com.google.xyz)](https://discourse.processing.org/t/how-can-i-use-external-libraries-com-google-xyz/26404)

<div class="topic-metadata">

**Author:** [@EinsMalteHH](https://discourse.processing.org/u/EinsMalteHH)\
**Replies:** 1\
**Last updated:** [December 20, 2020, 9:11pm UTC](https://discourse.processing.org/t/how-can-i-use-external-libraries-com-google-xyz/26404 "2020-12-20T21:11:49Z")

</div>

How can i use external libraries? import com.google.api.client.auth.oauth2.Credential; import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp; import com.google.api.client.extensions.…

---

## [Having keyPressed() in multiple classes](https://discourse.processing.org/t/having-keypressed-in-multiple-classes/26401)

<div class="topic-metadata">

**Author:** [@gapigapi](https://discourse.processing.org/u/gapigapi)\
**Replies:** 2\
**Last updated:** [December 20, 2020, 6:53pm UTC](https://discourse.processing.org/t/having-keypressed-in-multiple-classes/26401 "2020-12-20T18:53:30Z")

</div>

I am having some problems with void keypress() function. If i use it in the main class it works, but if i then try to call a class where i do the maths and then draw() which works in that class and draw on canvas create…

---

## [Countdown d, h, min, sec and ms?](https://discourse.processing.org/t/countdown-d-h-min-sec-and-ms/18145)

<div class="topic-metadata">

**Author:** [@Teljemo](https://discourse.processing.org/u/Teljemo)\
**Replies:** 13\
**Last updated:** [December 20, 2020, 1:48pm UTC](https://discourse.processing.org/t/countdown-d-h-min-sec-and-ms/18145 "2020-12-20T13:48:37Z")

</div>

Hi I googled this a fair amount now and cant really find a answer. Can someone point me in the right direction here :slight\_smile: I’ve just got a date for when we will have a visit from the man who owns our company. …

---

## [Slider and led help](https://discourse.processing.org/t/slider-and-led-help/26392)

<div class="topic-metadata">

**Author:** [@r0x15](https://discourse.processing.org/u/r0x15)\
**Replies:** 1\
**Last updated:** [December 20, 2020, 11:49am UTC](https://discourse.processing.org/t/slider-and-led-help/26392 "2020-12-20T11:49:12Z")

</div>

Good morning I open another post because I am not convinced of the answers I have been given regarding my problem perhaps due to the misunderstanding of English (google translated) and therefore the problem is not well…

---

## [Struggling to implement a pause/delay within my for-loop](https://discourse.processing.org/t/struggling-to-implement-a-pause-delay-within-my-for-loop/26313)

<div class="topic-metadata">

**Author:** [@mon](https://discourse.processing.org/u/mon)\
**Replies:** 15\
**Last updated:** [December 20, 2020, 1:51am UTC](https://discourse.processing.org/t/struggling-to-implement-a-pause-delay-within-my-for-loop/26313 "2020-12-20T01:51:36Z")

</div>

Beginner here. I am developing a program that involves drawing a grid of cells, in a row-by-row fashion. I want the program to draw a row of cells, then pause for a short time (say 1 second) before moving down and drawi…

---

## [Help determining data type](https://discourse.processing.org/t/help-determining-data-type/26233)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 14\
**Last updated:** [December 19, 2020, 11:57pm UTC](https://discourse.processing.org/t/help-determining-data-type/26233 "2020-12-19T23:57:03Z")

</div>

Hi! I started doing the java coding challenges from edabit.com. There is a challenge where you need to filter out Strings from an array and only leave numbers. https://edabit.com/challenge/vNszi3mbJA5BhgGFX ( turn \[4,1…

---

## [Strange text-displacement within grid-spaced typography](https://discourse.processing.org/t/strange-text-displacement-within-grid-spaced-typography/26384)

<div class="topic-metadata">

**Author:** [@Namrad](https://discourse.processing.org/u/Namrad)\
**Replies:** 1\
**Last updated:** [December 19, 2020, 4:45pm UTC](https://discourse.processing.org/t/strange-text-displacement-within-grid-spaced-typography/26384 "2020-12-19T16:45:41Z")

</div>

Hello, The idea for a project I’m working on rests on the use of typography in a grid. I wanted to put one letter in the center (x) of every cell of this grid. The size of the letter would be determined/altered by an un…

---

## [G4P - How to disable 'You might want to add...' console message?](https://discourse.processing.org/t/g4p-how-to-disable-you-might-want-to-add-console-message/26373)

<div class="topic-metadata">

**Author:** [@MauiMana](https://discourse.processing.org/u/MauiMana)\
**Replies:** 1\
**Last updated:** [December 19, 2020, 2:35pm UTC](https://discourse.processing.org/t/g4p-how-to-disable-you-might-want-to-add-console-message/26373 "2020-12-19T14:35:34Z")

</div>

Is there any way of disabling the automatic message that gets output to the console suggesting that one adds a method to handle, for example, GButton events? In using GButtons I typically assign handlers at the specific …

---

## [How to bounce a ball off a randomly generated line?](https://discourse.processing.org/t/how-to-bounce-a-ball-off-a-randomly-generated-line/26379)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [December 19, 2020, 11:13am UTC](https://discourse.processing.org/t/how-to-bounce-a-ball-off-a-randomly-generated-line/26379 "2020-12-19T11:13:39Z")

</div>

Hi! I recently made a bouncing ball program float x = 300, y = 300, r = 30, xs = 10, ys = 8, friction = 0.9; void setup() { size(600,600); } void draw() { background(0); circle(x,y,r\*2); x+=xs; y+=ys; i…

---

## [Issue with expecting }, found 'else'](https://discourse.processing.org/t/issue-with-expecting-found-else/26377)

<div class="topic-metadata">

**Author:** [@yevsym](https://discourse.processing.org/u/yevsym)\
**Replies:** 8\
**Last updated:** [December 19, 2020, 10:33am UTC](https://discourse.processing.org/t/issue-with-expecting-found-else/26377 "2020-12-19T10:33:23Z")

</div>

I wrote this code, but Processing keeps telling me about the “expecting }, found ‘else’” error. I checked my code many times, but I just stick at missing out the mistake. Please help out, if you spot it. void draw() { …

---

## [For-loop problem: space between rotating squares](https://discourse.processing.org/t/for-loop-problem-space-between-rotating-squares/26370)

<div class="topic-metadata">

**Author:** [@trelosti](https://discourse.processing.org/u/trelosti)\
**Replies:** 2\
**Last updated:** [December 19, 2020, 8:18am UTC](https://discourse.processing.org/t/for-loop-problem-space-between-rotating-squares/26370 "2020-12-19T08:18:01Z")

</div>

Good day, I am a beginner in Processing and programming in general, and recently my teacher gave me a task to implement the following thing in Processing: draw a big square consisting of smaller squares and move it acro…

---

## [bezierVertex() draws straight lines, not a curved line?](https://discourse.processing.org/t/beziervertex-draws-straight-lines-not-a-curved-line/3139)

<div class="topic-metadata">

**Author:** [@tony](https://discourse.processing.org/u/tony)\
**Replies:** 7\
**Last updated:** [December 18, 2020, 7:27pm UTC](https://discourse.processing.org/t/beziervertex-draws-straight-lines-not-a-curved-line/3139 "2020-12-18T19:27:15Z")

</div>

I thought I was using bezierVertex() correctly, but what the hey. void setup() { size(512,512); PShape bez = createShape(); bez.beginShape(); bez.noFill(); bez.stroke(255,0,0); bez.strokeWeight(2); bez.…

---

## [Png save and screen capture producing different results](https://discourse.processing.org/t/png-save-and-screen-capture-producing-different-results/26296)

<div class="topic-metadata">

**Author:** [@saltandonion](https://discourse.processing.org/u/saltandonion)\
**Replies:** 3\
**Last updated:** [December 18, 2020, 6:28pm UTC](https://discourse.processing.org/t/png-save-and-screen-capture-producing-different-results/26296 "2020-12-18T18:28:10Z")

</div>

has anyone else noticed saving a frame to png alters the colors from processing? i setup a code that just randomly creates 100 squares of random colors. i save the frame as a png and take a screen shot. the colors are s…

---

## [Scaling problem : newbie ahead :)](https://discourse.processing.org/t/scaling-problem-newbie-ahead/26367)

<div class="topic-metadata">

**Author:** [@galleon](https://discourse.processing.org/u/galleon)\
**Replies:** 4\
**Last updated:** [December 18, 2020, 5:05pm UTC](https://discourse.processing.org/t/scaling-problem-newbie-ahead/26367 "2020-12-18T17:05:06Z")

</div>

Hello all, I have started processing this morning even though I have a programming background. I am trying to do a very simple thing a square in a square :slight\_smile: This code is basically doing what I want. ce…

---

## [Odd behavior from curveVertex() - What am I doing wrong?](https://discourse.processing.org/t/odd-behavior-from-curvevertex-what-am-i-doing-wrong/26257)

<div class="topic-metadata">

**Author:** [@brendanbeck](https://discourse.processing.org/u/brendanbeck)\
**Replies:** 1\
**Last updated:** [December 15, 2020, 1:00pm UTC](https://discourse.processing.org/t/odd-behavior-from-curvevertex-what-am-i-doing-wrong/26257 "2020-12-15T13:00:07Z")

</div>

My curveVertex() calls seem to not be drawing points at my intended location. Notice for each iteration of draw(), I call curveVertex(0,0), yet no spline begins from the top left of the entire canvas. Am I using curveVer…

---

## [Making a game in processing - My first project](https://discourse.processing.org/t/making-a-game-in-processing-my-first-project/26216)

<div class="topic-metadata">

**Author:** [@GoWithTheFloe](https://discourse.processing.org/u/GoWithTheFloe)\
**Replies:** 4\
**Last updated:** [December 18, 2020, 2:29pm UTC](https://discourse.processing.org/t/making-a-game-in-processing-my-first-project/26216 "2020-12-18T14:29:23Z")

</div>

Hello guys. I’ve bee fighting a lot now to get the objects spawn right. The game have 3 elements spawning but the problem is to make them spawn after an object is pressed. I tried to use boolean but it won’t work and wi…

---

## [Help me add the Explode java example to a program](https://discourse.processing.org/t/help-me-add-the-explode-java-example-to-a-program/26345)

<div class="topic-metadata">

**Author:** [@megang](https://discourse.processing.org/u/megang)\
**Replies:** 1\
**Last updated:** [December 18, 2020, 10:12am UTC](https://discourse.processing.org/t/help-me-add-the-explode-java-example-to-a-program/26345 "2020-12-18T10:12:12Z")

</div>

Here is my program: PImage img0; PImage img1; PImage img2; PImage img3; ArrayList images; int width = 1280; int height = 850; void setup() { size(1280, 850); noFill(); stroke(255); frameRate(15); images = ne…

---

## [Help me with a scoring system?](https://discourse.processing.org/t/help-me-with-a-scoring-system/26338)

<div class="topic-metadata">

**Author:** [@reneetjuh](https://discourse.processing.org/u/reneetjuh)\
**Replies:** 12\
**Last updated:** [December 18, 2020, 9:51am UTC](https://discourse.processing.org/t/help-me-with-a-scoring-system/26338 "2020-12-18T09:51:08Z")

</div>

hey everyone reading this! so im wokring on a small project and im super stuck. How do I added a scoring system? so there is a mouse (animal) that’s on the mouse(pc) and I want him to collect cheese trough the game. N…

---

## [Adding a feature to a gravity simulator](https://discourse.processing.org/t/adding-a-feature-to-a-gravity-simulator/26278)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [December 18, 2020, 9:44am UTC](https://discourse.processing.org/t/adding-a-feature-to-a-gravity-simulator/26278 "2020-12-18T09:44:29Z")

</div>

Hi! I started creating yet another project! It is a gravity simulator. It started out fine but when I added a feature that makes the two circles “solid” (they can’t overlap) it started going weird. It just bounces infin…

---

## [How can I get Half Blur effect?](https://discourse.processing.org/t/how-can-i-get-half-blur-effect/26230)

<div class="topic-metadata">

**Author:** [@yhlaskerimov](https://discourse.processing.org/u/yhlaskerimov)\
**Replies:** 17\
**Last updated:** [December 18, 2020, 5:11am UTC](https://discourse.processing.org/t/how-can-i-get-half-blur-effect/26230 "2020-12-18T05:11:40Z")

</div>

Hello, everyone. I want to ask how can I get an effect called “Depth of Filed” with Processing. What I mean saying “Depth of Field” shown below: I appreciate every help, thanks !

---

## [Pixelflow softbody add node](https://discourse.processing.org/t/pixelflow-softbody-add-node/26356)

<div class="topic-metadata">

**Author:** [@AbleYudada](https://discourse.processing.org/u/AbleYudada)\
**Replies:** 1\
**Last updated:** [December 18, 2020, 4:00am UTC](https://discourse.processing.org/t/pixelflow-softbody-add-node/26356 "2020-12-18T04:00:22Z")

</div>

Hi guys, I’m doing some fun with pixelflow recently, but I tried for a while and checked the doc but I didn’t find a way to add node to the circle.It seems to be a fixed number of nodes, which are automatically added as …

---

## [Exported application shows grey screen](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324)

<div class="topic-metadata">

**Author:** [@jrubesch](https://discourse.processing.org/u/jrubesch)\
**Replies:** 7\
**Last updated:** [December 18, 2020, 12:23am UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324 "2020-12-18T00:23:25Z")

</div>

Hi all! I’ve been having problems with exporting the code into an application. When I run the application the only thing that shows up is a blank grey screen. This has happened with all the few programs I’ve tried to exp…

---

## [Boolean confusion](https://discourse.processing.org/t/boolean-confusion/26348)

<div class="topic-metadata">

**Author:** [@SadCSstudent](https://discourse.processing.org/u/SadCSstudent)\
**Replies:** 2\
**Last updated:** [December 17, 2020, 11:38pm UTC](https://discourse.processing.org/t/boolean-confusion/26348 "2020-12-17T23:38:16Z")

</div>

nothing to see here anymore, question answered

---

## [Typography, Font problem](https://discourse.processing.org/t/typography-font-problem/26342)

<div class="topic-metadata">

**Author:** [@toc\_toc\_toc](https://discourse.processing.org/u/toc_toc_toc)\
**Replies:** 3\
**Last updated:** [December 17, 2020, 9:24pm UTC](https://discourse.processing.org/t/typography-font-problem/26342 "2020-12-17T21:24:18Z")

</div>

Hello, I have got some problem with my typography, first when i load my font (in police generator) , I can’t have mort than 50pt for the size and so when I want to write it bigger with textSize() the rendering is blurre…

---

## [oscP5, can't draw shapes from inside the oscEvent function](https://discourse.processing.org/t/oscp5-cant-draw-shapes-from-inside-the-oscevent-function/26309)

<div class="topic-metadata">

**Author:** [@adamstephensun](https://discourse.processing.org/u/adamstephensun)\
**Replies:** 2\
**Last updated:** [December 17, 2020, 8:19pm UTC](https://discourse.processing.org/t/oscp5-cant-draw-shapes-from-inside-the-oscevent-function/26309 "2020-12-17T20:19:17Z")

</div>

I am fairly new to processing but have experience in other languages. I am using the oscP5 library to send coordinates from Unity to processing over osc. However, I am having an issue with drawing shapes from within the…

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=160)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=162)
