# Latest

**URL:** https://discourse.processing.org/latest.md?page=280

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

**Page:** 281

---

## [Processing Confirmation Window](https://discourse.processing.org/t/processing-confirmation-window/25816)

<div class="topic-metadata">

**Author:** [@Idris](https://discourse.processing.org/u/Idris)\
**Replies:** 1\
**Last updated:** [November 30, 2020, 5:46am UTC](https://discourse.processing.org/t/processing-confirmation-window/25816 "2020-11-30T05:46:13Z")

</div>

Hey guys!. Can you all please help me of how to make a confirmation window before exiting the sketch with the options ‘Yes’ and ‘No’ in Processing 3.0 Java? Here is my simple code: boolean correct\[\] = {false,false}; vo…

---

## [Fatal error: Protocol error (Runtime.callFunctionOn): Object reference chain is too long](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591)

<div class="topic-metadata">

**Author:** [@ankit1029](https://discourse.processing.org/u/ankit1029)\
**Replies:** 4\
**Last updated:** [November 30, 2020, 3:23am UTC](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591 "2020-11-30T03:23:34Z")

</div>

i was trying to set up the dev environement for p5.js i followed the instructions on this site https://p5js.org/contributor-docs/#/ after navigating into the p5.js folder ,npm ci worked fine but when i tried to run th…

---

## [How to move an Object at x and y simultaneously?](https://discourse.processing.org/t/how-to-move-an-object-at-x-and-y-simultaneously/25801)

<div class="topic-metadata">

**Author:** [@corken](https://discourse.processing.org/u/corken)\
**Replies:** 4\
**Last updated:** [November 30, 2020, 1:02am UTC](https://discourse.processing.org/t/how-to-move-an-object-at-x-and-y-simultaneously/25801 "2020-11-30T01:02:03Z")

</div>

Hello I dont quite understand how to move an object on the x and on the y at the same time. It would be nice if someone could give me an example. Also here is the code im working on right now. If you want to correct i…

---

## [A timer which activates by pressing a button](https://discourse.processing.org/t/a-timer-which-activates-by-pressing-a-button/25818)

<div class="topic-metadata">

**Author:** [@thedarklord](https://discourse.processing.org/u/thedarklord)\
**Replies:** 1\
**Last updated:** [November 29, 2020, 11:20pm UTC](https://discourse.processing.org/t/a-timer-which-activates-by-pressing-a-button/25818 "2020-11-29T23:20:42Z")

</div>

I’m trying to make a timer which starts by pressing a button. I’ve tried millis() but it starts counting as soon as I start the program.

---

## [How to animate an Image?](https://discourse.processing.org/t/how-to-animate-an-image/25819)

<div class="topic-metadata">

**Author:** [@corken](https://discourse.processing.org/u/corken)\
**Replies:** 1\
**Last updated:** [November 29, 2020, 10:56pm UTC](https://discourse.processing.org/t/how-to-animate-an-image/25819 "2020-11-29T22:56:03Z")

</div>

Hello, my question is how to animate an moving object. In my code I can move Mario and added the animation. But it is at 60 fps by default so its really fast. When I cap the FPS the animation obviously is slower but als…

---

## [How to sort words alphabetically from a String?](https://discourse.processing.org/t/how-to-sort-words-alphabetically-from-a-string/12767)

<div class="topic-metadata">

**Author:** [@lolonulu](https://discourse.processing.org/u/lolonulu)\
**Replies:** 119\
**Last updated:** [November 29, 2020, 10:26pm UTC](https://discourse.processing.org/t/how-to-sort-words-alphabetically-from-a-string/12767 "2020-11-29T22:26:10Z")

</div>

Hello, The code below compiles, but the way the words are displayed is really strange (last word on the left and then the other words on its right…) how come ?!! I want to sort the words in alphabetical order and chang…

---

## [Video webcam motion detection troubles](https://discourse.processing.org/t/video-webcam-motion-detection-troubles/16153)

<div class="topic-metadata">

**Author:** [@noFae](https://discourse.processing.org/u/noFae)\
**Replies:** 8\
**Last updated:** [November 29, 2020, 8:54pm UTC](https://discourse.processing.org/t/video-webcam-motion-detection-troubles/16153 "2020-11-29T20:54:33Z")

</div>

Having difficulties with accessing webcam when using motion detection code. Webcam works with other applications and when running Processing code, the viewing window is just dark. I tried to used the printArray Capture.…

---

## [Calling arraylist object function on entire arraylist](https://discourse.processing.org/t/calling-arraylist-object-function-on-entire-arraylist/25813)

<div class="topic-metadata">

**Author:** [@ScriptKiddie](https://discourse.processing.org/u/ScriptKiddie)\
**Replies:** 1\
**Last updated:** [November 29, 2020, 5:14pm UTC](https://discourse.processing.org/t/calling-arraylist-object-function-on-entire-arraylist/25813 "2020-11-29T17:14:49Z")

</div>

Hi everyone, pseudocode below: class Class { void function() { instruction performed by object; } } ArrayList\<Class\> objectList = new ArrayList(100); for(int i = 0; i \< 100; i++) { objectList.get(i)…

---

## [String to base64 and vice versa](https://discourse.processing.org/t/string-to-base64-and-vice-versa/25690)

<div class="topic-metadata">

**Author:** [@papaboo](https://discourse.processing.org/u/papaboo)\
**Replies:** 4\
**Last updated:** [November 29, 2020, 5:14pm UTC](https://discourse.processing.org/t/string-to-base64-and-vice-versa/25690 "2020-11-29T17:14:45Z")

</div>

Hi, I’ve searched through the forum but seen base64 applied only for images. Is it possible convert a string to base64 and decrypt base64 to plain text? In Javascript I think it’s done with “atob” “btoa”, what about in…

---

## [This ball goes through the rectangle rather than hitting it or bouncing it](https://discourse.processing.org/t/this-ball-goes-through-the-rectangle-rather-than-hitting-it-or-bouncing-it/25783)

<div class="topic-metadata">

**Author:** [@Waka](https://discourse.processing.org/u/Waka)\
**Replies:** 66\
**Last updated:** [November 29, 2020, 5:05pm UTC](https://discourse.processing.org/t/this-ball-goes-through-the-rectangle-rather-than-hitting-it-or-bouncing-it/25783 "2020-11-29T17:05:50Z")

</div>

Hi, Can you please help to make the ball hit the rectangle rather than go through the rectangle float ballx,bally,xspeed=5,yspeed=8; void setup() { size(displayWidth,displayHeight); stroke(255); strokeWeight(100); } v…

---

## [Save when app close, exit() ... stop()](https://discourse.processing.org/t/save-when-app-close-exit-stop/25754)

<div class="topic-metadata">

**Author:** [@matheplica](https://discourse.processing.org/u/matheplica)\
**Replies:** 7\
**Last updated:** [November 29, 2020, 12:25pm UTC](https://discourse.processing.org/t/save-when-app-close-exit-stop/25754 "2020-11-29T12:25:32Z")

</div>

Hi, I’m trying to save data when my app close either with mouse or ESC button. I try with exit() and stop() with any result. this is my code void stop(){ saveSlides(); exit(); } Thanks

---

## [Generative Patterns Processing Poster](https://discourse.processing.org/t/generative-patterns-processing-poster/25721)

<div class="topic-metadata">

**Author:** [@angela1811](https://discourse.processing.org/u/angela1811)\
**Replies:** 14\
**Last updated:** [November 29, 2020, 11:43am UTC](https://discourse.processing.org/t/generative-patterns-processing-poster/25721 "2020-11-29T11:43:28Z")

</div>

Hello everyone, I am a newbie in Processing! I have to submit a project very soon for the final exam at university T^T But it’s so sad I’m stuck with my project. I have to create a programming poster but I’m don’t have…

---

## [How do I change the size of the display window?](https://discourse.processing.org/t/how-do-i-change-the-size-of-the-display-window/25384)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 27\
**Last updated:** [November 29, 2020, 12:57am UTC](https://discourse.processing.org/t/how-do-i-change-the-size-of-the-display-window/25384 "2020-11-29T00:57:34Z")

</div>

So, I was tampering around with the “setResizable” feature in Processing. I was pretty satisfied with the results, when combined with the “scale” function and the “PMatrix” class, I can basically resize the entire sketc…

---

## [Random() seems to be very biased towards positive numbers. how to mitigate?](https://discourse.processing.org/t/random-seems-to-be-very-biased-towards-positive-numbers-how-to-mitigate/25749)

<div class="topic-metadata">

**Author:** [@exe](https://discourse.processing.org/u/exe)\
**Replies:** 10\
**Last updated:** [November 29, 2020, 12:19am UTC](https://discourse.processing.org/t/random-seems-to-be-very-biased-towards-positive-numbers-how-to-mitigate/25749 "2020-11-29T00:19:09Z")

</div>

My level of expertise is pretty low, I have some mild background in Java and QBasic way back when, and otherwise have learned most of the little I know via Daniel’s YT tuts (of which I’ve still many to go through). But …

---

## [How to extract values from a PVector?](https://discourse.processing.org/t/how-to-extract-values-from-a-pvector/25778)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 4\
**Last updated:** [November 28, 2020, 7:17pm UTC](https://discourse.processing.org/t/how-to-extract-values-from-a-pvector/25778 "2020-11-28T19:17:31Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I am using the leapmotion library and some values are coming in a PVector. They print out fine, but when I put them in a string to be sent to A…

---

## [How to make a rectangle spawn when mouseclicked and will bounce](https://discourse.processing.org/t/how-to-make-a-rectangle-spawn-when-mouseclicked-and-will-bounce/25742)

<div class="topic-metadata">

**Author:** [@0w3n928](https://discourse.processing.org/u/0w3n928)\
**Replies:** 2\
**Last updated:** [November 28, 2020, 6:51pm UTC](https://discourse.processing.org/t/how-to-make-a-rectangle-spawn-when-mouseclicked-and-will-bounce/25742 "2020-11-28T18:51:13Z")

</div>

I’m trying to make another rectangle spawn when mouse is clicked once and it will collide to my first bouncing rectangle and I can add however many i want but my code doesn’t even need me to click and it doesn’t really w…

---

## [P5Js & Ableton Live - Interactive Visual Music](https://discourse.processing.org/t/p5js-ableton-live-interactive-visual-music/25776)

<div class="topic-metadata">

**Author:** [@mnoble](https://discourse.processing.org/u/mnoble)\
**Replies:** 2\
**Last updated:** [November 28, 2020, 6:43pm UTC](https://discourse.processing.org/t/p5js-ableton-live-interactive-visual-music/25776 "2020-11-28T18:43:25Z")

</div>

Hello Processing Forum! New interactive visual music piece made in P5JS and Ableton Live. Made for folks waiting at the airport or elsewhere. Link

---

## [Random elements different positions](https://discourse.processing.org/t/random-elements-different-positions/16984)

<div class="topic-metadata">

**Author:** [@San](https://discourse.processing.org/u/San)\
**Replies:** 4\
**Last updated:** [November 28, 2020, 6:33pm UTC](https://discourse.processing.org/t/random-elements-different-positions/16984 "2020-11-28T18:33:17Z")

</div>

Hi I want to draw squares on random positions on a grid, but I don’t want to have them on the same position. If I run the code sometimes there are two squares on the same position. I know that it has something to do wit…

---

## [Food Drop from an Airplane](https://discourse.processing.org/t/food-drop-from-an-airplane/25782)

<div class="topic-metadata">

**Author:** [@Elo](https://discourse.processing.org/u/Elo)\
**Replies:** 1\
**Last updated:** [November 28, 2020, 5:36pm UTC](https://discourse.processing.org/t/food-drop-from-an-airplane/25782 "2020-11-28T17:36:43Z")

</div>

I don’t know what I’m doing wrong and I don’t understand processing that well; Can Someone help me fix the issues and bugs in my program \[details=“Summary”\] This text will be hidden //plane coordinates int planeX…

---

## [Public void onActivityResult(int requestCode, int resultCode, Intent data)](https://discourse.processing.org/t/public-void-onactivityresult-int-requestcode-int-resultcode-intent-data/831)

<div class="topic-metadata">

**Author:** [@basher24](https://discourse.processing.org/u/basher24)\
**Replies:** 6\
**Last updated:** [November 28, 2020, 4:35pm UTC](https://discourse.processing.org/t/public-void-onactivityresult-int-requestcode-int-resultcode-intent-data/831 "2020-11-28T16:35:43Z")

</div>

hi all why the " public void onActivityResult(int requestCode, int resultCode, Intent data) " not working ? import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Environ…

---

## [I am going to do a roll dice game](https://discourse.processing.org/t/i-am-going-to-do-a-roll-dice-game/25780)

<div class="topic-metadata">

**Author:** [@mengtong](https://discourse.processing.org/u/mengtong)\
**Replies:** 2\
**Last updated:** [November 28, 2020, 12:26pm UTC](https://discourse.processing.org/t/i-am-going-to-do-a-roll-dice-game/25780 "2020-11-28T12:26:52Z")

</div>

Here is my code, now I can roll my dice. But I want the only dice or dices I choose to re-roll, others ignore. I didt finish reroll function. I dont know how to do it. Can someone give me some suggest? final int NUM\_SID…

---

## [Index out of bounds](https://discourse.processing.org/t/index-out-of-bounds/25775)

<div class="topic-metadata">

**Author:** [@ScriptKiddie](https://discourse.processing.org/u/ScriptKiddie)\
**Replies:** 4\
**Last updated:** [November 28, 2020, 9:27am UTC](https://discourse.processing.org/t/index-out-of-bounds/25775 "2020-11-28T09:27:30Z")

</div>

Hi everyone, I’m hoping I’m missing something simple here. I want to display an object (which works) and when my player entity collides with this object the object should disappear. My collision code works but once the …

---

## [Transparency in save() function](https://discourse.processing.org/t/transparency-in-save-function/25699)

<div class="topic-metadata">

**Author:** [@yanze03](https://discourse.processing.org/u/yanze03)\
**Replies:** 14\
**Last updated:** [November 28, 2020, 9:22am UTC](https://discourse.processing.org/t/transparency-in-save-function/25699 "2020-11-28T09:22:35Z")

</div>

So I made this code where you can draw and create an image. This works just fine but is it possible to get an image with a transparant background? Is there like a function to remove everything with RGB code white in a ce…

---

## [How to get a P5 image into the DOM?](https://discourse.processing.org/t/how-to-get-a-p5-image-into-the-dom/25726)

<div class="topic-metadata">

**Author:** [@zenglenn](https://discourse.processing.org/u/zenglenn)\
**Replies:** 9\
**Last updated:** [November 28, 2020, 7:08am UTC](https://discourse.processing.org/t/how-to-get-a-p5-image-into-the-dom/25726 "2020-11-28T07:08:07Z")

</div>

Hi I want to get an internally created image file (not loaded or from a url) into the DOM. I’m sure it’s really simple, but have no idea, thanks.

---

## [Decimal into binary numbers](https://discourse.processing.org/t/decimal-into-binary-numbers/25758)

<div class="topic-metadata">

**Author:** [@Ellie98](https://discourse.processing.org/u/Ellie98)\
**Replies:** 2\
**Last updated:** [November 28, 2020, 6:40am UTC](https://discourse.processing.org/t/decimal-into-binary-numbers/25758 "2020-11-28T06:40:54Z")

</div>

Hey, i’m trying to convert the decimal numerbs into binary numbers but I get a lot of zeros in front of the binary numbers. How do I cut of the zeros? Thanks in advance! void setup() { //System.out.printf("Dez -\> Du…

---

## [Trying to understand why a boolean is returning true](https://discourse.processing.org/t/trying-to-understand-why-a-boolean-is-returning-true/25779)

<div class="topic-metadata">

**Author:** [@crimpqwe](https://discourse.processing.org/u/crimpqwe)\
**Replies:** 1\
**Last updated:** [November 28, 2020, 4:49am UTC](https://discourse.processing.org/t/trying-to-understand-why-a-boolean-is-returning-true/25779 "2020-11-28T04:49:12Z")

</div>

import controlP5.\*; boolean button1 = false, button2 = false, button3 = false; ControlP5 cp5; float bg = random(255); void setup() { size(1200, 750); cp5 = new ControlP5(this); cp5.addButton("A") .setPosi…

---

## [Connect USB webcam to Processing Android with Ketai](https://discourse.processing.org/t/connect-usb-webcam-to-processing-android-with-ketai/25664)

<div class="topic-metadata">

**Author:** [@flotowcameron](https://discourse.processing.org/u/flotowcameron)\
**Replies:** 4\
**Last updated:** [November 28, 2020, 12:47am UTC](https://discourse.processing.org/t/connect-usb-webcam-to-processing-android-with-ketai/25664 "2020-11-28T00:47:54Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi everyone, Can someone send me the code needed to connect a webcam to an android device? I am using Processing Android Mode obviously and I’v…

---

## [Sending data from python to processing](https://discourse.processing.org/t/sending-data-from-python-to-processing/25771)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 7\
**Last updated:** [November 27, 2020, 8:41pm UTC](https://discourse.processing.org/t/sending-data-from-python-to-processing/25771 "2020-11-27T20:41:35Z")

</div>

Hi I’m trying to transmit sensor data from a python script to a processing sketch via sockets. On the python side I have: import socket import random HOST = '' # Symbolic name meaning all availabl…

---

## [Expecting EOF, found else](https://discourse.processing.org/t/expecting-eof-found-else/25759)

<div class="topic-metadata">

**Author:** [@muffininwinter](https://discourse.processing.org/u/muffininwinter)\
**Replies:** 2\
**Last updated:** [November 27, 2020, 8:01pm UTC](https://discourse.processing.org/t/expecting-eof-found-else/25759 "2020-11-27T20:01:41Z")

</div>

please format code with \</\> button \* homework policy \* asking questions boolean running = false; PImage imgbk; PImage imgm; PImage albert; PImage imgnote; String\[\] imageNames = { "albert0.jpg", "albert1.jpg" }; PI…

---

## [Making a RGB leds strips control gui](https://discourse.processing.org/t/making-a-rgb-leds-strips-control-gui/25762)

<div class="topic-metadata">

**Author:** [@extazy](https://discourse.processing.org/u/extazy)\
**Replies:** 1\
**Last updated:** [November 27, 2020, 6:30pm UTC](https://discourse.processing.org/t/making-a-rgb-leds-strips-control-gui/25762 "2020-11-27T18:30:51Z")

</div>

Hi , I am actually on a project wich consists of creating a gui to control multiple rgb led strips and normal leds . So what i need for this project is at least two colors pickers ( or colors wheels ) and some buttons …

[Previous page](https://discourse.processing.org/latest.md?page=279)

[Next page](https://discourse.processing.org/latest.md?page=281)
