# Processing

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

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

**Page:** 224

---

## [Expecting }, found 'else'](https://discourse.processing.org/t/expecting-found-else/19328)

<div class="topic-metadata">

**Author:** [@soolim](https://discourse.processing.org/u/soolim)\
**Replies:** 4\
**Last updated:** [April 2, 2020, 1:25pm UTC](https://discourse.processing.org/t/expecting-found-else/19328 "2020-04-02T13:25:16Z")

</div>

Hello. An error occurred during processing coding. I don’t know what the problem is. In points (a,b), a wants to get a +d(random) The error is the same as ’ expecting }, found ‘else’ '. If you’re good at processin…

---

## [Many bouncing balls](https://discourse.processing.org/t/many-bouncing-balls/19165)

<div class="topic-metadata">

**Author:** [@dimdim](https://discourse.processing.org/u/dimdim)\
**Replies:** 2\
**Last updated:** [April 2, 2020, 3:21am UTC](https://discourse.processing.org/t/many-bouncing-balls/19165 "2020-04-02T03:21:16Z")

</div>

hi everyone, i have problem with my codes. i wanna try making animation many bouncing balls. my bouncing balls solved when all the balls force the all windows’s side. but the problem is the balls is still through the oth…

---

## [Does anyone know how to make a play button for a game?](https://discourse.processing.org/t/does-anyone-know-how-to-make-a-play-button-for-a-game/19302)

<div class="topic-metadata">

**Author:** [@Oppyusa](https://discourse.processing.org/u/Oppyusa)\
**Replies:** 1\
**Last updated:** [April 1, 2020, 8:44pm UTC](https://discourse.processing.org/t/does-anyone-know-how-to-make-a-play-button-for-a-game/19302 "2020-04-01T20:44:31Z")

</div>

I am trying to make a game and don’t know how to make the background change until a new button is pressed. Here is my code: PImage bg; int y; void setup() { size(1000, 700); bg = loadImage("download.jpeg"); } boo…

---

## [Wrap Text to Shapes](https://discourse.processing.org/t/wrap-text-to-shapes/18756)

<div class="topic-metadata">

**Author:** [@robdin](https://discourse.processing.org/u/robdin)\
**Replies:** 6\
**Last updated:** [April 1, 2020, 8:22pm UTC](https://discourse.processing.org/t/wrap-text-to-shapes/18756 "2020-04-01T20:22:46Z")

</div>

Hello, I’m traying to wrap a image to shape. I see that i can do it with a shape and a texture. The only problem is that textureWrape(textureWrap() / Reference / Processing.org) seems to works only on a beginshape and …

---

## [Animating a scene with cars and planes (help and challenge)](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232)

<div class="topic-metadata">

**Author:** [@Booijink747](https://discourse.processing.org/u/Booijink747)\
**Replies:** 11\
**Last updated:** [April 1, 2020, 6:53pm UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232 "2020-04-01T18:53:48Z")

</div>

I would like to make something like this but then just a little bit different, I wondered whether some of you know how to make this exact thing in Processing 3, so I can look at the code and make my own var…

---

## [Quit program from JOptionpane](https://discourse.processing.org/t/quit-program-from-joptionpane/18396)

<div class="topic-metadata">

**Author:** [@NotConsumable](https://discourse.processing.org/u/NotConsumable)\
**Replies:** 1\
**Last updated:** [March 5, 2020, 12:46am UTC](https://discourse.processing.org/t/quit-program-from-joptionpane/18396 "2020-03-05T00:46:44Z")

</div>

I am wondering if it is an if statement or a loop along side a pre determined string in order to make the exit(); function run specifically when a certain phrase is typed into the message box in JOptionpane.showInputDia…

---

## [Problem with missing ball (foo)](https://discourse.processing.org/t/problem-with-missing-ball-foo/19276)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 7\
**Last updated:** [April 1, 2020, 8:01pm UTC](https://discourse.processing.org/t/problem-with-missing-ball-foo/19276 "2020-04-01T20:01:25Z")

</div>

I have a sketch (see below) where a ball moves. When I tested it, everything seems to work but now the ball has gone off the screen to the right somewhere. How do I get my ball back? Ball\[\] balls = new Ball\[1\]; void s…

---

## [Requirements that Processing has for loading TIFF files](https://discourse.processing.org/t/requirements-that-processing-has-for-loading-tiff-files/19281)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 14\
**Last updated:** [April 1, 2020, 8:00pm UTC](https://discourse.processing.org/t/requirements-that-processing-has-for-loading-tiff-files/19281 "2020-04-01T20:00:46Z")

</div>

Is there a way to find out the requirements that Processing has for loading TIFF files? The documents say only gif, .jpg, .tga, or .png but I can load TIFF if the TIFF has been made by Processing. Error: Processing can …

---

## [FIRST ONE TO MAKE THE EXACT SAME THING WINS! (against boredom by corona)](https://discourse.processing.org/t/first-one-to-make-the-exact-same-thing-wins-against-boredom-by-corona/19233)

<div class="topic-metadata">

**Author:** [@Booijink747](https://discourse.processing.org/u/Booijink747)\
**Replies:** 0\
**Last updated:** [March 31, 2020, 8:29am UTC](https://discourse.processing.org/t/first-one-to-make-the-exact-same-thing-wins-against-boredom-by-corona/19233 "2020-03-31T08:29:16Z")

</div>

requirements: there is an airplane or a bird in the air. the left-front and right-back light are connected. (they are ment for horizontal driving cars). when the light turns red, the cars stop vertical ca…

---

## [Array with for loop exercise in Nyhoff book](https://discourse.processing.org/t/array-with-for-loop-exercise-in-nyhoff-book/19277)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 3\
**Last updated:** [April 1, 2020, 5:44pm UTC](https://discourse.processing.org/t/array-with-for-loop-exercise-in-nyhoff-book/19277 "2020-04-01T17:44:45Z")

</div>

This is an exercise in the Nyhoff book. I am trying to figure out how to output to the consul the column position and the row position 5 times. So that it reads like this: column: random number, row: random number col…

---

## [Modify text alignment of a ScrollableList in ControlP5 library](https://discourse.processing.org/t/modify-text-alignment-of-a-scrollablelist-in-controlp5-library/18835)

<div class="topic-metadata">

**Author:** [@NaniAromix](https://discourse.processing.org/u/NaniAromix)\
**Replies:** 6\
**Last updated:** [April 1, 2020, 4:04pm UTC](https://discourse.processing.org/t/modify-text-alignment-of-a-scrollablelist-in-controlp5-library/18835 "2020-04-01T16:04:44Z")

</div>

I am trying to create a menu type list in my program, which when clicked reveals a drop down list of different screens to show next. This is how it looks at the moment: I have changed the font but can’t get to center …

---

## [GtextField.setNumericType(int) 'not found'](https://discourse.processing.org/t/gtextfield-setnumerictype-int-not-found/19051)

<div class="topic-metadata">

**Author:** [@MauiMana](https://discourse.processing.org/u/MauiMana)\
**Replies:** 1\
**Last updated:** [April 1, 2020, 3:39pm UTC](https://discourse.processing.org/t/gtextfield-setnumerictype-int-not-found/19051 "2020-04-01T15:39:25Z")

</div>

It looks like this is only available in G4P 4.3.3, which I can’t seem to find a download for (4.3.2 is the most recent I can find). When I look through both the java docs and even the source of previous versions I’m not …

---

## [How to move obstacles?](https://discourse.processing.org/t/how-to-move-obstacles/18944)

<div class="topic-metadata">

**Author:** [@NotConsumable](https://discourse.processing.org/u/NotConsumable)\
**Replies:** 6\
**Last updated:** [April 1, 2020, 3:37pm UTC](https://discourse.processing.org/t/how-to-move-obstacles/18944 "2020-04-01T15:37:42Z")

</div>

So I am trying to make a frogger game and I have everything doing what I need it to do, but my hazards wont move and everything i try to do does not work? I have no idea how to make them move and how to add another row a…

---

## [New here and in need of help!](https://discourse.processing.org/t/new-here-and-in-need-of-help/19079)

<div class="topic-metadata">

**Author:** [@NiteOwl](https://discourse.processing.org/u/NiteOwl)\
**Replies:** 11\
**Last updated:** [April 1, 2020, 3:18pm UTC](https://discourse.processing.org/t/new-here-and-in-need-of-help/19079 "2020-04-01T15:18:29Z")

</div>

Hello to whomever might read this. I am a coder and have been for 40 years of coding experience but mostly programs written on my own. I love to work in the processing language but I do have my limits which is why I am h…

---

## [Problems with .svg libraries](https://discourse.processing.org/t/problems-with-svg-libraries/19206)

<div class="topic-metadata">

**Author:** [@CheckschDa](https://discourse.processing.org/u/CheckschDa)\
**Replies:** 3\
**Last updated:** [April 1, 2020, 2:03pm UTC](https://discourse.processing.org/t/problems-with-svg-libraries/19206 "2020-04-01T14:03:58Z")

</div>

Hello I’m having some Problems withe the .svg library. I wanted to write a little code, which should export 15 .svg files. But its only exporting the last one. Is my Code broken or is the .svg exporter not able to expor…

---

## [How to get distance from a line](https://discourse.processing.org/t/how-to-get-distance-from-a-line/19215)

<div class="topic-metadata">

**Author:** [@Cybernet](https://discourse.processing.org/u/Cybernet)\
**Replies:** 5\
**Last updated:** [April 1, 2020, 1:56pm UTC](https://discourse.processing.org/t/how-to-get-distance-from-a-line/19215 "2020-04-01T13:56:21Z")

</div>

So I have a line in my code. And a object moves alongside it. How can I say that if the object more than 50 pixels away from the line, then move the object. If the object is less than 50 pixels away from the line, then m…

---

## [Is text align local?](https://discourse.processing.org/t/is-text-align-local/19158)

<div class="topic-metadata">

**Author:** [@Cybernet](https://discourse.processing.org/u/Cybernet)\
**Replies:** 6\
**Last updated:** [April 1, 2020, 10:20am UTC](https://discourse.processing.org/t/is-text-align-local/19158 "2020-04-01T10:20:22Z")

</div>

So if I put textAlign(LEFT) inside a function, will it only be that function, or the entire code? void Function() { textAlign(LEFT); }

---

## [Error: ArrayIndexOutOfBoundsException: -1](https://discourse.processing.org/t/error-arrayindexoutofboundsexception-1/19267)

<div class="topic-metadata">

**Author:** [@Sofia8425](https://discourse.processing.org/u/Sofia8425)\
**Replies:** 2\
**Last updated:** [April 1, 2020, 7:38am UTC](https://discourse.processing.org/t/error-arrayindexoutofboundsexception-1/19267 "2020-04-01T07:38:56Z")

</div>

I am trying to code a snake game. This isn’t the finished version, but I am already cluless. When I try to run it this error appears: ArrayIndexOutOfBoundsException: -1 Could not run the sketch (Target VM failed to ini…

---

## [How to add circle in the code as noise](https://discourse.processing.org/t/how-to-add-circle-in-the-code-as-noise/19111)

<div class="topic-metadata">

**Author:** [@firetryer](https://discourse.processing.org/u/firetryer)\
**Replies:** 2\
**Last updated:** [April 1, 2020, 2:31am UTC](https://discourse.processing.org/t/how-to-add-circle-in-the-code-as-noise/19111 "2020-04-01T02:31:52Z")

</div>

---

## [2D Topographical Map](https://discourse.processing.org/t/2d-topographical-map/19260)

<div class="topic-metadata">

**Author:** [@heatmiser](https://discourse.processing.org/u/heatmiser)\
**Replies:** 1\
**Last updated:** [March 31, 2020, 6:41pm UTC](https://discourse.processing.org/t/2d-topographical-map/19260 "2020-03-31T18:41:42Z")

</div>

Hi, I’m very new to Processing. I’m looking to create a small square plot that has contour lines like the 2D topographical map shown in the image below. How would I go about doing this? Thanks.

---

## [Problem Plotting Using Grafica & serialEvent()](https://discourse.processing.org/t/problem-plotting-using-grafica-serialevent/19005)

<div class="topic-metadata">

**Author:** [@atomo](https://discourse.processing.org/u/atomo)\
**Replies:** 7\
**Last updated:** [March 31, 2020, 6:21pm UTC](https://discourse.processing.org/t/problem-plotting-using-grafica-serialevent/19005 "2020-03-31T18:21:11Z")

</div>

Hello, this is my first post. I’ve used Arduino for a couple of years now but I am new to processing. I’m trying to create a fixture that turns a stepper motor with an Arduino while simultaneously reads the torque output…

---

## [oscP5 error handling, if client is connected](https://discourse.processing.org/t/oscp5-error-handling-if-client-is-connected/19242)

<div class="topic-metadata">

**Author:** [@GeorgeJava](https://discourse.processing.org/u/GeorgeJava)\
**Replies:** 1\
**Last updated:** [March 31, 2020, 5:32pm UTC](https://discourse.processing.org/t/oscp5-error-handling-if-client-is-connected/19242 "2020-03-31T17:32:34Z")

</div>

Hello, i want to get some info about connecting to server, if is client connected, how to get it ? import oscP5.\*; OscP5 oscP5tcpClient; void setup() { size(600, 360); oscP5tcpClient = new OscP5(this, "127.0.0…

---

## [How to make every drawing scale if canvas size is changed](https://discourse.processing.org/t/how-to-make-every-drawing-scale-if-canvas-size-is-changed/18697)

<div class="topic-metadata">

**Author:** [@Dan99](https://discourse.processing.org/u/Dan99)\
**Replies:** 2\
**Last updated:** [March 31, 2020, 12:42pm UTC](https://discourse.processing.org/t/how-to-make-every-drawing-scale-if-canvas-size-is-changed/18697 "2020-03-31T12:42:58Z")

</div>

I’m very new to coding and was wondering how i could change this code to scale if the canvas size was to change. I know its not the nicest or cleanest code but it works for how I understand it currently. void setup() {…

---

## [Make a shoot function](https://discourse.processing.org/t/make-a-shoot-function/19235)

<div class="topic-metadata">

**Author:** [@rune](https://discourse.processing.org/u/rune)\
**Replies:** 8\
**Last updated:** [March 31, 2020, 11:23am UTC](https://discourse.processing.org/t/make-a-shoot-function/19235 "2020-03-31T11:23:45Z")

</div>

Trying to make a copy of space invaders, it’s purely for fun but now i’ve used quite a while trying to make the shoot function work proberly. The problem is that my “bullet” disapears after i move my player, due to the f…

---

## [Java quits when using Capture](https://discourse.processing.org/t/java-quits-when-using-capture/19155)

<div class="topic-metadata">

**Author:** [@TimoL](https://discourse.processing.org/u/TimoL)\
**Replies:** 2\
**Last updated:** [March 31, 2020, 10:41am UTC](https://discourse.processing.org/t/java-quits-when-using-capture/19155 "2020-03-31T10:41:52Z")

</div>

I’m trying to use Capture to get my MacbookPro’s webcam. Even following a basic tutorial gives me this same error that I don’t understand. If I try to run the sketch again I get this prompt: “The last time you opened j…

---

## [Cloud Animation - Processing Basics](https://discourse.processing.org/t/cloud-animation-processing-basics/19216)

<div class="topic-metadata">

**Author:** [@Dan99](https://discourse.processing.org/u/Dan99)\
**Replies:** 4\
**Last updated:** [March 31, 2020, 8:27am UTC](https://discourse.processing.org/t/cloud-animation-processing-basics/19216 "2020-03-31T08:27:42Z")

</div>

Need help, would love to call or share screen of discord with someone who is willing to lend a hand! I would like to be taught how to Click and drag clouds one at a time. constrained to above horizon. when another c…

---

## [How do I save this as a video, without background?](https://discourse.processing.org/t/how-do-i-save-this-as-a-video-without-background/19174)

<div class="topic-metadata">

**Author:** [@noa\_noa](https://discourse.processing.org/u/noa_noa)\
**Replies:** 2\
**Last updated:** [March 31, 2020, 7:57am UTC](https://discourse.processing.org/t/how-do-i-save-this-as-a-video-without-background/19174 "2020-03-31T07:57:20Z")

</div>

This is My code (where do i add the saveFrames()? or what do I add?: void setup() { background(600); size(800, 800); } void draw() { background(255); stroke(0); strokeWeight(1.4); scale(0.8); translat…

---

## [Shader displaying glitchy](https://discourse.processing.org/t/shader-displaying-glitchy/19134)

<div class="topic-metadata">

**Author:** [@opheliagame](https://discourse.processing.org/u/opheliagame)\
**Replies:** 4\
**Last updated:** [March 31, 2020, 5:09am UTC](https://discourse.processing.org/t/shader-displaying-glitchy/19134 "2020-03-31T05:09:26Z")

</div>

I have written a shader. In VSCode it looks like the one on the right. But on processing, it looks glitchy. Only the bottom left ‘block’ looks clean.

---

## [How to draw a flower, rotate petals](https://discourse.processing.org/t/how-to-draw-a-flower-rotate-petals/19143)

<div class="topic-metadata">

**Author:** [@tengtengloves](https://discourse.processing.org/u/tengtengloves)\
**Replies:** 23\
**Last updated:** [March 30, 2020, 10:44pm UTC](https://discourse.processing.org/t/how-to-draw-a-flower-rotate-petals/19143 "2020-03-30T22:44:55Z")

</div>

Hi all, I’m have no idea with coding but I really tried hard to fix it. I was stuck to draw on the flower petal code, I have tried for couple times but it not works. The flower petal couldn’t be rotated. Plus, when I r…

---

## [Frogger game (make the frog not to go outside)](https://discourse.processing.org/t/frogger-game-make-the-frog-not-to-go-outside/18825)

<div class="topic-metadata">

**Author:** [@nhghi](https://discourse.processing.org/u/nhghi)\
**Replies:** 8\
**Last updated:** [March 20, 2020, 5:26pm UTC](https://discourse.processing.org/t/frogger-game-make-the-frog-not-to-go-outside/18825 "2020-03-20T17:26:40Z")

</div>

hi, guys, I’m trying to make a new game. the basic idea is if my green frog will go around the canvas but it will not go outside of it. I created a objectInCanvas() function to see if the frog goes outside or not. so rig…

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

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