# Processing

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

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

**Page:** 358

---

## [How can I access object method inside other object?](https://discourse.processing.org/t/how-can-i-access-object-method-inside-other-object/4609)

<div class="topic-metadata">

**Author:** [@enonod](https://discourse.processing.org/u/enonod)\
**Replies:** 5\
**Last updated:** [October 19, 2018, 8:54am UTC](https://discourse.processing.org/t/how-can-i-access-object-method-inside-other-object/4609 "2018-10-19T08:54:41Z")

</div>

Within DPanel I have added two objects, captionBar and btnClose and have called their display() methods successfully as shown in DPanel.display(). I have attempted to bring in a third object via the DPanel method addObje…

---

## [How to make game say you won?](https://discourse.processing.org/t/how-to-make-game-say-you-won/4560)

<div class="topic-metadata">

**Author:** [@ant](https://discourse.processing.org/u/ant)\
**Replies:** 7\
**Last updated:** [October 19, 2018, 2:26am UTC](https://discourse.processing.org/t/how-to-make-game-say-you-won/4560 "2018-10-19T02:26:43Z")

</div>

I want to make it so when the ball hits the white finish box it says you win and restarts the code. //Varaibles for images PImage frankenstein,ghost; PImage startscreen; //variables for start screen int screensizex,scre…

---

## [Save an image from display window coordinates](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610)

<div class="topic-metadata">

**Author:** [@Daniel\_Tex](https://discourse.processing.org/u/Daniel_Tex)\
**Replies:** 4\
**Last updated:** [October 19, 2018, 12:54am UTC](https://discourse.processing.org/t/save-an-image-from-display-window-coordinates/4610 "2018-10-19T00:54:25Z")

</div>

How to save an image from the display window within coordinates? (Such as x \> 0 && x \< 100 && y \> 100 && y \< 200).

---

## [Creating game using Aurdino and Processing](https://discourse.processing.org/t/creating-game-using-aurdino-and-processing/4612)

<div class="topic-metadata">

**Author:** [@japoiu](https://discourse.processing.org/u/japoiu)\
**Replies:** 0\
**Last updated:** [October 18, 2018, 6:41pm UTC](https://discourse.processing.org/t/creating-game-using-aurdino-and-processing/4612 "2018-10-18T18:41:37Z")

</div>

I have written the code for a game using Arduino and Processing where the ball hits the blocks and we get points and a paddle bounces the ball. If the ball misses the paddle and moves out the game ends. I have a button w…

---

## [Cropping shape of movie into a circle](https://discourse.processing.org/t/cropping-shape-of-movie-into-a-circle/4586)

<div class="topic-metadata">

**Author:** [@moonspacedancer](https://discourse.processing.org/u/moonspacedancer)\
**Replies:** 2\
**Last updated:** [October 18, 2018, 10:15pm UTC](https://discourse.processing.org/t/cropping-shape-of-movie-into-a-circle/4586 "2018-10-18T22:15:26Z")

</div>

Hi, I am trying to play only a circle shape of my movie and not sure where to start… my overall basic concept right now is that when i zoom into a sphere the movie is inside playing in the center in the shape of a circle…

---

## [Need help with rotating a shape](https://discourse.processing.org/t/need-help-with-rotating-a-shape/4548)

<div class="topic-metadata">

**Author:** [@rebelcoder](https://discourse.processing.org/u/rebelcoder)\
**Replies:** 10\
**Last updated:** [October 18, 2018, 9:51pm UTC](https://discourse.processing.org/t/need-help-with-rotating-a-shape/4548 "2018-10-18T21:51:27Z")

</div>

Hi guys I am new to processing. I am trying to make a spaceship in an asteroid game. I have to make the spaceship using the 4 points using quad shape. The spaceship moves across the screen which is pretty simple by chang…

---

## [Object to object referencing](https://discourse.processing.org/t/object-to-object-referencing/4598)

<div class="topic-metadata">

**Author:** [@jakstb](https://discourse.processing.org/u/jakstb)\
**Replies:** 2\
**Last updated:** [October 18, 2018, 7:33pm UTC](https://discourse.processing.org/t/object-to-object-referencing/4598 "2018-10-18T19:33:51Z")

</div>

Hi, I have problem referencing to a object from within another object. Here is my code that is a bit simplified to only show my problem; class Team { String team; int elements; int maxElements; Bubble\[\] b; …

---

## [Multiple shaders](https://discourse.processing.org/t/multiple-shaders/4595)

<div class="topic-metadata">

**Author:** [@bitCrasher](https://discourse.processing.org/u/bitCrasher)\
**Replies:** 6\
**Last updated:** [October 18, 2018, 5:36pm UTC](https://discourse.processing.org/t/multiple-shaders/4595 "2018-10-18T17:36:44Z")

</div>

is there a better solution to create a sketch using multiple shaders? PShader myShader, pixelate; PImage img; PGraphics pg, buf; void settings() { size(1000, 1000, P3D); } void setup() { myShader = loadShader("gli…

---

## [Help with void draw](https://discourse.processing.org/t/help-with-void-draw/4592)

<div class="topic-metadata">

**Author:** [@Lore](https://discourse.processing.org/u/Lore)\
**Replies:** 2\
**Last updated:** [October 18, 2018, 4:32pm UTC](https://discourse.processing.org/t/help-with-void-draw/4592 "2018-10-18T16:32:18Z")

</div>

What is a simple way to put something in void draw but only play it once (although it keeps updating?) In my code, I want to play a video but the video can be switched to a different video. The problem with this is that …

---

## [Trojan alert on downloading 3.4 AND 3.3.7!](https://discourse.processing.org/t/trojan-alert-on-downloading-3-4-and-3-3-7/4387)

<div class="topic-metadata">

**Author:** [@jb0815](https://discourse.processing.org/u/jb0815)\
**Replies:** 6\
**Last updated:** [October 18, 2018, 10:33am UTC](https://discourse.processing.org/t/trojan-alert-on-downloading-3-4-and-3-3-7/4387 "2018-10-18T10:33:52Z")

</div>

Both versions have been removed from windows 10 defender as including TrojanDownloader:JS/Jasobfus.B!ml What’s going on. Is it a serious alert or not. And if not, when will programmers fix it ?

---

## [Array object doesn't work](https://discourse.processing.org/t/array-object-doesnt-work/4584)

<div class="topic-metadata">

**Author:** [@rva1945](https://discourse.processing.org/u/rva1945)\
**Replies:** 4\
**Last updated:** [October 18, 2018, 12:17am UTC](https://discourse.processing.org/t/array-object-doesnt-work/4584 "2018-10-18T00:17:41Z")

</div>

Hi: I used this example as a guide https://processing.org/examples/arrayobjects.html but my sketch hangs the Java windows and I have to close the window. Turnout\[\] aTurnouts; void setup() { size(1024,500); aTurno…

---

## [Depth Sorting and PShape](https://discourse.processing.org/t/depth-sorting-and-pshape/1730)

<div class="topic-metadata">

**Author:** [@Stephcraft](https://discourse.processing.org/u/Stephcraft)\
**Replies:** 13\
**Last updated:** [October 17, 2018, 10:18pm UTC](https://discourse.processing.org/t/depth-sorting-and-pshape/1730 "2018-10-17T22:18:47Z")

</div>

Am I doing something wrong or hint(ENABLE\_DEPTH\_SORT); only works with beginShape() and endShape() and not with PShape. If I am not wrong, and this is a issue, how can I do depth sort myself on PShapes ? Screenshot, red…

---

## [Play field boundary for a: rect for loop](https://discourse.processing.org/t/play-field-boundary-for-a-rect-for-loop/4487)

<div class="topic-metadata">

**Author:** [@SolDrakibane](https://discourse.processing.org/u/SolDrakibane)\
**Replies:** 5\
**Last updated:** [October 17, 2018, 8:39pm UTC](https://discourse.processing.org/t/play-field-boundary-for-a-rect-for-loop/4487 "2018-10-17T20:39:12Z")

</div>

Alright, so for my assignment i need to make a Memory Card game. However, one of the first things i need to wrap my head around is the boundary. I need to be able to loop the cards inside the playField. I also need to m…

---

## [Video within a shape (or alpha mask)](https://discourse.processing.org/t/video-within-a-shape-or-alpha-mask/663)

<div class="topic-metadata">

**Author:** [@rossig7](https://discourse.processing.org/u/rossig7)\
**Replies:** 8\
**Last updated:** [October 17, 2018, 8:07pm UTC](https://discourse.processing.org/t/video-within-a-shape-or-alpha-mask/663 "2018-10-17T20:07:00Z")

</div>

Hello everyone!, I´m rather new into processing, but I have experience coding. I want to put the video streaming withing a an irregular shape (it doesn´t have to be a rectangle). My approach, I did a b&w mask image with…

---

## [Help for a code](https://discourse.processing.org/t/help-for-a-code/4561)

<div class="topic-metadata">

**Author:** [@singenya](https://discourse.processing.org/u/singenya)\
**Replies:** 1\
**Last updated:** [October 17, 2018, 5:23pm UTC](https://discourse.processing.org/t/help-for-a-code/4561 "2018-10-17T17:23:10Z")

</div>

hello I need help on a code, I’m trying to make a line that would move from the top to bottom and when it reach the bottom it get back to the top. I’ve done this and achieved making it get down but I can’t manage to ma…

---

## [Increasing memory issue](https://discourse.processing.org/t/increasing-memory-issue/4557)

<div class="topic-metadata">

**Author:** [@gerome](https://discourse.processing.org/u/gerome)\
**Replies:** 2\
**Last updated:** [October 17, 2018, 2:38pm UTC](https://discourse.processing.org/t/increasing-memory-issue/4557 "2018-10-17T14:38:12Z")

</div>

Hi there, when I start my sketch it needs less than 5 GB of Ram and after one or two hours this increases up to more than 25 GB. I set the limit to 26 GB. The sketch is quite huge but there is no acculmulation of loadin…

---

## [\[SOLVED\] G4P options in second window problem](https://discourse.processing.org/t/solved-g4p-options-in-second-window-problem/4552)

<div class="topic-metadata">

**Author:** [@kll](https://discourse.processing.org/u/kll)\
**Replies:** 4\
**Last updated:** [October 17, 2018, 1:54pm UTC](https://discourse.processing.org/t/solved-g4p-options-in-second-window-problem/4552 "2018-10-17T13:54:26Z")

</div>

when i use basic ( reduced from example ) code all works. import g4p\_controls.\*; GOption option0, option1, option2; public void setup() { size(500,500); createGUI(); } public void draw() { background(100, 100, 2…

---

## [How to create a opening flap or opening window?](https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520)

<div class="topic-metadata">

**Author:** [@dennisreyes](https://discourse.processing.org/u/dennisreyes)\
**Replies:** 3\
**Last updated:** [October 17, 2018, 11:47am UTC](https://discourse.processing.org/t/how-to-create-a-opening-flap-or-opening-window/4520 "2018-10-17T11:47:50Z")

</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.

---

## [Game Control Plus - trouble with config](https://discourse.processing.org/t/game-control-plus-trouble-with-config/2143)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 3\
**Last updated:** [October 16, 2018, 9:52pm UTC](https://discourse.processing.org/t/game-control-plus-trouble-with-config/2143 "2018-10-16T21:52:27Z")

</div>

Hello. I’ve been able to use GCP to connect a Logitech game controller to Processing, mostly. I have been trying to set up the configuration file so that it only recognizes 4 buttons. I started with the “joystick” examp…

---

## [Rectangle should grow then stop (resolved)](https://discourse.processing.org/t/rectangle-should-grow-then-stop-resolved/4541)

<div class="topic-metadata">

**Author:** [@singenya](https://discourse.processing.org/u/singenya)\
**Replies:** 2\
**Last updated:** [October 16, 2018, 5:30pm UTC](https://discourse.processing.org/t/rectangle-should-grow-then-stop-resolved/4541 "2018-10-16T17:30:01Z")

</div>

hello, i’m a beginner on processing and I want to make something simple but I don’t really understand why it don’t work. here’s my code : void setup() { size(600, 600); background(255); } void draw() { for (int …

---

## [Getting unexpected return value when appending to array](https://discourse.processing.org/t/getting-unexpected-return-value-when-appending-to-array/4498)

<div class="topic-metadata">

**Author:** [@LethalShadow](https://discourse.processing.org/u/LethalShadow)\
**Replies:** 5\
**Last updated:** [October 16, 2018, 3:36pm UTC](https://discourse.processing.org/t/getting-unexpected-return-value-when-appending-to-array/4498 "2018-10-16T15:36:53Z")

</div>

Hello programmers, I am trying to write a program for a school excercise and it’s actually coming along quite nicely. It’s supposed to be a game called subset (a lighter version of a game called “set”). The game consi…

---

## [Game Control Plus: using a joystick with switches instead of sliders](https://discourse.processing.org/t/game-control-plus-using-a-joystick-with-switches-instead-of-sliders/4534)

<div class="topic-metadata">

**Author:** [@hamoid](https://discourse.processing.org/u/hamoid)\
**Replies:** 2\
**Last updated:** [October 16, 2018, 3:19pm UTC](https://discourse.processing.org/t/game-control-plus-using-a-joystick-with-switches-instead-of-sliders/4534 "2018-10-16T15:19:35Z")

</div>

Hi! I’m wondering if anyone has suggestions about using an oldschool joystick with Game Control Plus. The difference is that the stick returns only -1.0, 0.0 or 1.0. In this case it would be convenient to have events, bu…

---

## [\[SOLVED\] Two questions: Printing and Screen](https://discourse.processing.org/t/solved-two-questions-printing-and-screen/4538)

<div class="topic-metadata">

**Author:** [@hngkong](https://discourse.processing.org/u/hngkong)\
**Replies:** 2\
**Last updated:** [October 16, 2018, 2:51pm UTC](https://discourse.processing.org/t/solved-two-questions-printing-and-screen/4538 "2018-10-16T14:51:14Z")

</div>

Hello! I was hoping for some help with two things. The first is that I was hoping to print out a drawing I created in Processing. I know how to print out the code, but I was hoping to print the actual picture that was…

---

## [Help! Clocks! - Minutes & For Loops](https://discourse.processing.org/t/help-clocks-minutes-for-loops/4527)

<div class="topic-metadata">

**Author:** [@madiMcD](https://discourse.processing.org/u/madiMcD)\
**Replies:** 3\
**Last updated:** [October 16, 2018, 1:26pm UTC](https://discourse.processing.org/t/help-clocks-minutes-for-loops/4527 "2018-10-16T13:26:39Z")

</div>

Hello! I’m in the process currently of trying to make a program that runs a type of clock. I am using images in my program, but for the purposes of my question, I have substituted ellipses. I understand how to use a nes…

---

## [Record audio and video simultaneously](https://discourse.processing.org/t/record-audio-and-video-simultaneously/4529)

<div class="topic-metadata">

**Author:** [@bitCrasher](https://discourse.processing.org/u/bitCrasher)\
**Replies:** 0\
**Last updated:** [October 16, 2018, 8:10am UTC](https://discourse.processing.org/t/record-audio-and-video-simultaneously/4529 "2018-10-16T08:10:02Z")

</div>

hi guys, is there a way to record audio and video simultaneously? I ask because when I go to recompose a video adding the audio afterwards I always have problems with synchronization. I created a class that performs th…

---

## [Nf() issue with decimal point](https://discourse.processing.org/t/nf-issue-with-decimal-point/4125)

<div class="topic-metadata">

**Author:** [@gyula](https://discourse.processing.org/u/gyula)\
**Replies:** 20\
**Last updated:** [October 16, 2018, 7:46am UTC](https://discourse.processing.org/t/nf-issue-with-decimal-point/4125 "2018-10-16T07:46:59Z")

</div>

Hi, The following prints 1,2 (with comma) instead of 1.2: float f = 1.23; String s = nf(f, 0, 1); println(s); // Prints "1,2" That behaviour was already reported in April 2016, yet contiues to contradict the descript…

---

## [請教各位大大教導如何寫顏色變數](https://discourse.processing.org/t/topic/4519)

<div class="topic-metadata">

**Author:** [@alk5603](https://discourse.processing.org/u/alk5603)\
**Replies:** 4\
**Last updated:** [October 16, 2018, 7:14am UTC](https://discourse.processing.org/t/topic/4519 "2018-10-16T07:14:46Z")

</div>

各位大大好 小弟想請教一下,關於球類的問題 只要球有連一條線就變色 二條線又變另一種顏色 三條線又變一種色 那我的代碼要怎麼打比較好 請各位大大指教 1.一條線變藍 2.二條線變紅 3.三條線變黃 int num = 50, radius = 50; int\[\] posX, posY, speedX, speedY; void setup() { size(800, 600); stroke(255); …

---

## [USB comm from an Android device](https://discourse.processing.org/t/usb-comm-from-an-android-device/4501)

<div class="topic-metadata">

**Author:** [@rva1945](https://discourse.processing.org/u/rva1945)\
**Replies:** 0\
**Last updated:** [October 15, 2018, 6:24pm UTC](https://discourse.processing.org/t/usb-comm-from-an-android-device/4501 "2018-10-15T18:24:03Z")

</div>

HI: I have already tried to control my layout from Processing running on a PC with W7. Of course I now want to run it on an Android device for the same purpose. It sends commands to the Arduino via USB serial port. My …

---

## [Opengl shader error](https://discourse.processing.org/t/opengl-shader-error/4493)

<div class="topic-metadata">

**Author:** [@aaditya99983](https://discourse.processing.org/u/aaditya99983)\
**Replies:** 0\
**Last updated:** [October 15, 2018, 3:25pm UTC](https://discourse.processing.org/t/opengl-shader-error/4493 "2018-10-15T15:25:12Z")

</div>

I am getting this error while trying some saved examples from processing ide : Cannot compile vertex shader: 0:1(10): error: GLSL 0.00 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES can someone help …

---

## [Sketch does not run; P2D Error (\[...\] Please call TIS/TSM in main thread) - Looking for workaround](https://discourse.processing.org/t/sketch-does-not-run-p2d-error-please-call-tis-tsm-in-main-thread-looking-for-workaround/4488)

<div class="topic-metadata">

**Author:** [@polispace](https://discourse.processing.org/u/polispace)\
**Replies:** 2\
**Last updated:** [October 15, 2018, 1:06pm UTC](https://discourse.processing.org/t/sketch-does-not-run-p2d-error-please-call-tis-tsm-in-main-thread-looking-for-workaround/4488 "2018-10-15T13:06:35Z")

</div>

Hi there I’ve already seen questions about this topic and I’m aware there is still not a real solution for this error. I couldn’t find a workaround to allow my sketch to run. Wondering if form the community here I can g…

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

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