# Processing

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

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

**Page:** 342

---

## [How to have my image move horizontally?](https://discourse.processing.org/t/how-to-have-my-image-move-horizontally/6321)

<div class="topic-metadata">

**Author:** [@CyanNi](https://discourse.processing.org/u/CyanNi)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 10:00am UTC](https://discourse.processing.org/t/how-to-have-my-image-move-horizontally/6321 "2018-12-05T10:00:16Z")

</div>

I’m working on my game that’s based on the chrome dino run game that plays whenever you’re offline. However, I’m facing a problem, I can’t get my image to move the way the dino does in the game. I’m sorry for bothering…

---

## [How to insert colourMode()s into stroke and fill](https://discourse.processing.org/t/how-to-insert-colourmode-s-into-stroke-and-fill/6049)

<div class="topic-metadata">

**Author:** [@CowPieForever](https://discourse.processing.org/u/CowPieForever)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 5:43am UTC](https://discourse.processing.org/t/how-to-insert-colourmode-s-into-stroke-and-fill/6049 "2018-12-05T05:43:06Z")

</div>

Sorry if this is a dumb question, I’m pretty new at this. I would like to insert different colourMode()s into the actual stroke and fill command of a specific shape. How can I do this? Following the instructions on the p…

---

## [Can Video and Text Co-exist?](https://discourse.processing.org/t/can-video-and-text-co-exist/5335)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 21\
**Last updated:** [December 5, 2018, 4:23am UTC](https://discourse.processing.org/t/can-video-and-text-co-exist/5335 "2018-12-05T04:23:01Z")

</div>

I have been using Daniel Example “sketch\_11\_5\_AveragePixelColorTracking” for blob tracking. I thought I could get myself a couple of text lines under the video in the sketch to show XY etc… The text displays but does n…

---

## [How to create the code of the following video effect?](https://discourse.processing.org/t/how-to-create-the-code-of-the-following-video-effect/5999)

<div class="topic-metadata">

**Author:** [@Malvan](https://discourse.processing.org/u/Malvan)\
**Replies:** 2\
**Last updated:** [December 5, 2018, 3:07am UTC](https://discourse.processing.org/t/how-to-create-the-code-of-the-following-video-effect/5999 "2018-12-05T03:07:50Z")

</div>

Hello there! I was searching through the internet to find anything useful regarding to one of my school projects. I want to create something like this: https://vimeo.com/8218843 The problem is, I don’t really know wher…

---

## [If mousePressed, each click results in different event](https://discourse.processing.org/t/if-mousepressed-each-click-results-in-different-event/6285)

<div class="topic-metadata">

**Author:** [@Missmew72](https://discourse.processing.org/u/Missmew72)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 2:53am UTC](https://discourse.processing.org/t/if-mousepressed-each-click-results-in-different-event/6285 "2018-12-05T02:53:58Z")

</div>

Hi, so I’m new to processing and I have to create a school project. What I want to do is when I click the first time, an image appears. When I click a second time, the first image is replaces with the second image. I nee…

---

## [How to go about scaling a set of objects all together?](https://discourse.processing.org/t/how-to-go-about-scaling-a-set-of-objects-all-together/6231)

<div class="topic-metadata">

**Author:** [@francium401](https://discourse.processing.org/u/francium401)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 4:26am UTC](https://discourse.processing.org/t/how-to-go-about-scaling-a-set-of-objects-all-together/6231 "2018-12-04T04:26:41Z")

</div>

I have drawn four triangles to form a tree-looking object. I want to scale all the triangles it to a bigger size so that the tree looks bigger, say for example 200%. What do I need to do to achieve this? void setup(){ …

---

## [IntelliJ & Open Kinect for Processing](https://discourse.processing.org/t/intellij-open-kinect-for-processing/6303)

<div class="topic-metadata">

**Author:** [@ZZlm0Q](https://discourse.processing.org/u/ZZlm0Q)\
**Replies:** 0\
**Last updated:** [December 4, 2018, 9:08pm UTC](https://discourse.processing.org/t/intellij-open-kinect-for-processing/6303 "2018-12-04T21:08:04Z")

</div>

Hi all, I’m using Processing and IntelliJ due to the availability of Gradle (I’m not programming for Android, though) and because Processing’s IDE lacks some features that other development environments have. I’ve impo…

---

## [Trying to get the button to show up](https://discourse.processing.org/t/trying-to-get-the-button-to-show-up/6281)

<div class="topic-metadata">

**Author:** [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 7:51pm UTC](https://discourse.processing.org/t/trying-to-get-the-button-to-show-up/6281 "2018-12-04T19:51:19Z")

</div>

\*\* I have this code below and I am trying to get the button to show up but it wont run. I’m getting an error that says expecting EOF, found “last\_sum”. I’m not sure how to fix this. The error is talking about this line:…

---

## [Using digital Scale in processing](https://discourse.processing.org/t/using-digital-scale-in-processing/6261)

<div class="topic-metadata">

**Author:** [@b5003354](https://discourse.processing.org/u/b5003354)\
**Replies:** 1\
**Last updated:** [December 4, 2018, 6:43pm UTC](https://discourse.processing.org/t/using-digital-scale-in-processing/6261 "2018-12-04T18:43:35Z")

</div>

Hi, I’m trying to find away to use a digital scale with processing. is there a Library that i need to download or just using code? I’m at a loss i tried using Arduino but i would have to build the scale, using a digita…

---

## [Trap events with getHat in game control plus](https://discourse.processing.org/t/trap-events-with-gethat-in-game-control-plus/6138)

<div class="topic-metadata">

**Author:** [@bryan](https://discourse.processing.org/u/bryan)\
**Replies:** 5\
**Last updated:** [December 4, 2018, 2:07pm UTC](https://discourse.processing.org/t/trap-events-with-gethat-in-game-control-plus/6138 "2018-12-04T14:07:15Z")

</div>

Hi, i want to know if there’s a way to trap events with the dpad button in the game control plus library. i can trap events with buttons, for example the key A of the xbox controller might look like this: xbox.getButton(…

---

## [mousePressed to change image multiple times](https://discourse.processing.org/t/mousepressed-to-change-image-multiple-times/6275)

<div class="topic-metadata">

**Author:** [@Missmew72](https://discourse.processing.org/u/Missmew72)\
**Replies:** 1\
**Last updated:** [December 4, 2018, 4:06am UTC](https://discourse.processing.org/t/mousepressed-to-change-image-multiple-times/6275 "2018-12-04T04:06:23Z")

</div>

Hi, so I am making a code for a school project. It’s nothing too fancy but I’m very new to the program and have been trying to find a way around the issue but ave had no luck. Basically I have an image that is there when…

---

## [Why doesn't curveVertex work in this PShape](https://discourse.processing.org/t/why-doesnt-curvevertex-work-in-this-pshape/6263)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 3:28am UTC](https://discourse.processing.org/t/why-doesnt-curvevertex-work-in-this-pshape/6263 "2018-12-04T03:28:11Z")

</div>

I was looking at an example of creating a spiral on the old Processing forum, drawing a spiral size(800,800); smooth(); translate(width/2,height/2); strokeWeight(2); beginShape(); for(int i=0;i\<350;i++) { curveVertex(…

---

## [How do I program the arrow keys to move object instead of mouseX and mouseY?](https://discourse.processing.org/t/how-do-i-program-the-arrow-keys-to-move-object-instead-of-mousex-and-mousey/6267)

<div class="topic-metadata">

**Author:** [@alxsnol](https://discourse.processing.org/u/alxsnol)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 12:40am UTC](https://discourse.processing.org/t/how-do-i-program-the-arrow-keys-to-move-object-instead-of-mousex-and-mousey/6267 "2018-12-04T00:40:00Z")

</div>

import processing.video.\*; Capture cam; void setup() { size(560, 360); cam = new Capture(this, 560, 360, 30); cam.start(); } void draw() { if (cam.available()) { cam.read(); loadPixels(); cam.load…

---

## [How do I draw shapes over an image?](https://discourse.processing.org/t/how-do-i-draw-shapes-over-an-image/6228)

<div class="topic-metadata">

**Author:** [@JennyMcCreadie](https://discourse.processing.org/u/JennyMcCreadie)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 12:31am UTC](https://discourse.processing.org/t/how-do-i-draw-shapes-over-an-image/6228 "2018-12-04T00:31:56Z")

</div>

Hello It’s super simple but I’m trying to write a code where I have a background image and when you click on it or run the mouse over it, squares appear and stay on the page. I know it’s most likely to do with the order…

---

## [AppData Recovery](https://discourse.processing.org/t/appdata-recovery/6041)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 10:27pm UTC](https://discourse.processing.org/t/appdata-recovery/6041 "2018-12-03T22:27:49Z")

</div>

Some time ago I discovered that whenever I execute a sketch it saves all the sketch tabs in a new C:/Users/me/AppData/Local/Temp/sketchName\_\[randomnumbers\]temp directory. (I’m obviously using Windows.) Inside the folder …

---

## [Sequential Loop with Images](https://discourse.processing.org/t/sequential-loop-with-images/6160)

<div class="topic-metadata">

**Author:** [@RienziDeal](https://discourse.processing.org/u/RienziDeal)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 8:41pm UTC](https://discourse.processing.org/t/sequential-loop-with-images/6160 "2018-12-03T20:41:11Z")

</div>

Hi everyone, I created 36 different png’s of this orb that I designed in photoshop and I need to make processing run through all 36 of the images and then just do that forever so it looks like the orb is changing color. …

---

## [Drawing a line in a random direction from the end of a line](https://discourse.processing.org/t/drawing-a-line-in-a-random-direction-from-the-end-of-a-line/6262)

<div class="topic-metadata">

**Author:** [@jam.prescott](https://discourse.processing.org/u/jam.prescott)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 5:52pm UTC](https://discourse.processing.org/t/drawing-a-line-in-a-random-direction-from-the-end-of-a-line/6262 "2018-12-03T17:52:21Z")

</div>

Just started out using processing for a project and theres a drawing I’m trying to create. If this makes sense I’m trying to, Draw a line from a random point with a random length at a random direction Then draw a li…

---

## [Looking for a maintainer for GifAnimation library](https://discourse.processing.org/t/looking-for-a-maintainer-for-gifanimation-library/6258)

<div class="topic-metadata">

**Author:** [@extrapixel](https://discourse.processing.org/u/extrapixel)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 3:29pm UTC](https://discourse.processing.org/t/looking-for-a-maintainer-for-gifanimation-library/6258 "2018-12-03T15:29:04Z")

</div>

Hi there, The GifAnimation library is used to render processing sketches into animated Gifs I’m probably years too late to admit it, but I have no time to maintain the GifAnimation library anymore. Processing has sh…

---

## [Creating particle systems along a curve](https://discourse.processing.org/t/creating-particle-systems-along-a-curve/6259)

<div class="topic-metadata">

**Author:** [@tryingtogetagrip](https://discourse.processing.org/u/tryingtogetagrip)\
**Replies:** 3\
**Last updated:** [December 3, 2018, 4:31pm UTC](https://discourse.processing.org/t/creating-particle-systems-along-a-curve/6259 "2018-12-03T16:31:25Z")

</div>

Hey all, I have a question that I can’t seem to figure out. I know it is possible to use a mouseclick to create a new particle system (just as the example code I have attached beneath). However, what I would like is to …

---

## [Trying volume control of mp3 file with arduino flex sensor](https://discourse.processing.org/t/trying-volume-control-of-mp3-file-with-arduino-flex-sensor/6256)

<div class="topic-metadata">

**Author:** [@runwaysun](https://discourse.processing.org/u/runwaysun)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 3:10pm UTC](https://discourse.processing.org/t/trying-volume-control-of-mp3-file-with-arduino-flex-sensor/6256 "2018-12-03T15:10:13Z")

</div>

Hi im very new to processing. I want to control volume of a mp3 file with flex sensor. So if I bend the sensor the volume goes down. Arduino circuit works and I get the serial but it doesn’t work with processing. Sou…

---

## [Color selected from pallette randomly for ellipses drawn by an array](https://discourse.processing.org/t/color-selected-from-pallette-randomly-for-ellipses-drawn-by-an-array/6204)

<div class="topic-metadata">

**Author:** [@W1nDs0R](https://discourse.processing.org/u/W1nDs0R)\
**Replies:** 2\
**Last updated:** [December 2, 2018, 9:36pm UTC](https://discourse.processing.org/t/color-selected-from-pallette-randomly-for-ellipses-drawn-by-an-array/6204 "2018-12-02T21:36:20Z")

</div>

Hey there Guys, I was wondering if you could offer me some insight in to how I can color each ellipse randomly that is drawn by an array. Currently I have created a second array for colors which it draws from when the …

---

## [Questions on static methods](https://discourse.processing.org/t/questions-on-static-methods/6169)

<div class="topic-metadata">

**Author:** [@jb4x](https://discourse.processing.org/u/jb4x)\
**Replies:** 4\
**Last updated:** [December 2, 2018, 7:33pm UTC](https://discourse.processing.org/t/questions-on-static-methods/6169 "2018-12-02T19:33:43Z")

</div>

Hi everyone, I’m trying to get my head around static methods in a class. Let’s say I want to create the following class: class MyVector { float v1, v2; MyVector(float v1, float v2) { this.v1 = v1; this.…

---

## [Turning processing file into a website?](https://discourse.processing.org/t/turning-processing-file-into-a-website/6166)

<div class="topic-metadata">

**Author:** [@HelaRua](https://discourse.processing.org/u/HelaRua)\
**Replies:** 2\
**Last updated:** [December 2, 2018, 4:23pm UTC](https://discourse.processing.org/t/turning-processing-file-into-a-website/6166 "2018-12-02T16:23:42Z")

</div>

Hi! Is there a way to take a processing file and make it a website? Also: is it possible to have have many people collaborate and make changes on it while being able to see each other’s changes in real-time? Thanks :sm…

---

## [Making 3D planets](https://discourse.processing.org/t/making-3d-planets/6136)

<div class="topic-metadata">

**Author:** [@nerdboybi](https://discourse.processing.org/u/nerdboybi)\
**Replies:** 6\
**Last updated:** [December 2, 2018, 1:42am UTC](https://discourse.processing.org/t/making-3d-planets/6136 "2018-12-02T01:42:03Z")

</div>

Hello, so I have made this program where my planet rotates around the sun. final int SUN\_SIZE=50; final int planetSize=SUN\_SIZE/2; final int X\_RADIUS=150; final int Y\_RADIUS=35; float angle=0; final float SPEED=0.03; …

---

## [How do I create regular spirograph curves around an asymmetrical shape](https://discourse.processing.org/t/how-do-i-create-regular-spirograph-curves-around-an-asymmetrical-shape/5501)

<div class="topic-metadata">

**Author:** [@Rah](https://discourse.processing.org/u/Rah)\
**Replies:** 16\
**Last updated:** [December 1, 2018, 5:22pm UTC](https://discourse.processing.org/t/how-do-i-create-regular-spirograph-curves-around-an-asymmetrical-shape/5501 "2018-12-01T17:22:27Z")

</div>

Hello! I’m desparate for a solution to my problem and very thankful for any kind of help. I’m new to this program and I need to find a way how to create regular spirograph-like curves around an asymmetrical shape. So n…

---

## [Function wont work](https://discourse.processing.org/t/function-wont-work/6134)

<div class="topic-metadata">

**Author:** [@kornFusion](https://discourse.processing.org/u/kornFusion)\
**Replies:** 4\
**Last updated:** [December 1, 2018, 5:06pm UTC](https://discourse.processing.org/t/function-wont-work/6134 "2018-12-01T17:06:43Z")

</div>

Hey Everyone, I have coded a very simple game which works perfectly except the part where the player loses. I have a function called, dead with a condition that if deadSign == true show 2 pictures (PNG) which one of t…

---

## [How to set these object in the back?](https://discourse.processing.org/t/how-to-set-these-object-in-the-back/6133)

<div class="topic-metadata">

**Author:** [@ant](https://discourse.processing.org/u/ant)\
**Replies:** 7\
**Last updated:** [December 1, 2018, 4:48pm UTC](https://discourse.processing.org/t/how-to-set-these-object-in-the-back/6133 "2018-12-01T16:48:52Z")

</div>

Having trouble getting the stars to be behind the building and the windows to be behind the water and the bridge. float time = 0; float\[\] a = new float\[2000\]; wall\[\]walls; void setup(){ size(1000,700); for (int i =…

---

## [Volume control with analog sensor Arduino/ Processing](https://discourse.processing.org/t/volume-control-with-analog-sensor-arduino-processing/6122)

<div class="topic-metadata">

**Author:** [@Pomdibow](https://discourse.processing.org/u/Pomdibow)\
**Replies:** 6\
**Last updated:** [December 1, 2018, 12:28am UTC](https://discourse.processing.org/t/volume-control-with-analog-sensor-arduino-processing/6122 "2018-12-01T00:28:06Z")

</div>

Hi everyone, I would like to control the volume of my audio file or my video with a classic analog sensor. So I founded these sketchs to link Arduino and Processing and I modified it to map my volume but I don’t underst…

---

## [Overlaying images with opacity using tint() in P3D](https://discourse.processing.org/t/overlaying-images-with-opacity-using-tint-in-p3d/6114)

<div class="topic-metadata">

**Author:** [@currymike](https://discourse.processing.org/u/currymike)\
**Replies:** 5\
**Last updated:** [November 30, 2018, 6:37pm UTC](https://discourse.processing.org/t/overlaying-images-with-opacity-using-tint-in-p3d/6114 "2018-11-30T18:37:17Z")

</div>

I’m playing around with overlaying two images in 3D space using P3D and tint(). When I bring the opacity of the front image down instead of seeing the image behind I get a black box. (see images below). I trying to cr…

---

## [How to save 120 FFT values per second at 30 frames per second?](https://discourse.processing.org/t/how-to-save-120-fft-values-per-second-at-30-frames-per-second/6087)

<div class="topic-metadata">

**Author:** [@Jan](https://discourse.processing.org/u/Jan)\
**Replies:** 2\
**Last updated:** [November 30, 2018, 8:55am UTC](https://discourse.processing.org/t/how-to-save-120-fft-values-per-second-at-30-frames-per-second/6087 "2018-11-30T08:55:48Z")

</div>

My sketch will run at 30 frames per second. (much more will not be possible, its pretty much to render) But i need very detailed audio data of the audio input. If i save the values of the spectrum bands in every draw()…

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

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