<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with touchstarted() - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=touchstarted%28%29</link>
      <pubDate>Sun, 08 Aug 2021 20:01:19 +0000</pubDate>
         <description>Tagged with touchstarted() - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggedtouchstarted%28%29/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Trying to figure out the exact event for touch</title>
      <link>https://forum.processing.org/two/discussion/25526/trying-to-figure-out-the-exact-event-for-touch</link>
      <pubDate>Tue, 12 Dec 2017 00:15:03 +0000</pubDate>
      <dc:creator>sharatdotinfo</dc:creator>
      <guid isPermaLink="false">25526@/two/discussions</guid>
      <description><![CDATA[<p>I have the following event for mousePressed which works great.</p>

<pre><code>function mousePressed(){
    pg.fill(255, 0, 0);
    pg.ellipse(mouseX, mouseY, 20, 20);

    sendmouse(mouseX,mouseY);
}
</code></pre>

<p>I'm trying to get the same behavior on a mobile device with touch but I am not seeing the changes as expected on mobile. Here is my function. What am I doing wrong?</p>

<pre><code>function touchStarted() {
  pg.fill(255, 0, 0);
  pg.ellipse(mouseX, mouseY, 20, 20);
  sendmouse(mouseX,mouseY);

  return false;
}
</code></pre>

<p>In my setup() I have</p>

<pre><code>pg = createGraphics(578, 400);
</code></pre>
]]></description>
   </item>
   <item>
      <title>add touch listener to creategraphics</title>
      <link>https://forum.processing.org/two/discussion/26162/add-touch-listener-to-creategraphics</link>
      <pubDate>Mon, 29 Jan 2018 12:53:35 +0000</pubDate>
      <dc:creator>nevahid</dc:creator>
      <guid isPermaLink="false">26162@/two/discussions</guid>
      <description><![CDATA[<p>hi people... i can't add any kind of listeners to a p5.graphics object which is created using creategraphics().... any idea? any solution?</p>
]]></description>
   </item>
   <item>
      <title>Handling only one finger at time</title>
      <link>https://forum.processing.org/two/discussion/22019/handling-only-one-finger-at-time</link>
      <pubDate>Sat, 15 Apr 2017 20:04:46 +0000</pubDate>
      <dc:creator>zabka229</dc:creator>
      <guid isPermaLink="false">22019@/two/discussions</guid>
      <description><![CDATA[<p>Hello, i recently started using p5.js and it is quite funny.
I have a problem with function touchStarted() because i want to handle only one finger at the time.
If I touch two fingers at the same time I want to handle only the newer one.
I would use mousePressed or mouseClicked but it dont work on mobiles.
Thanks for your help!</p>
]]></description>
   </item>
   <item>
      <title>Touch doesn't change focus</title>
      <link>https://forum.processing.org/two/discussion/21910/touch-doesn-t-change-focus</link>
      <pubDate>Sun, 09 Apr 2017 21:31:56 +0000</pubDate>
      <dc:creator>milkykilm</dc:creator>
      <guid isPermaLink="false">21910@/two/discussions</guid>
      <description><![CDATA[<p>I added a p5.js sketch on the <a rel="nofollow" href="http://milkyklim.com/write-it-right/">page</a>.</p>

<p>Everything works as expected on the Desktop: 
I click any of the fields in "Leave Comment" and I can type.</p>

<p>But I can't click the field on my mobile phone. The fields can't get focus when I touch them.</p>

<p>Ideas?</p>

<p>As a side note: 
Is the variable <code>touchIsDown</code>deprecated?</p>
]]></description>
   </item>
   <item>
      <title>MAKE: Getting Started with p5.js book - Example 5-20 Touch the Screen</title>
      <link>https://forum.processing.org/two/discussion/21467/make-getting-started-with-p5-js-book-example-5-20-touch-the-screen</link>
      <pubDate>Sat, 18 Mar 2017 11:24:44 +0000</pubDate>
      <dc:creator>tkwanjp</dc:creator>
      <guid isPermaLink="false">21467@/two/discussions</guid>
      <description><![CDATA[<p>Hi, guys.</p>

<p>I'm working on the examples of the book: MAKE: Getting Started with p5.js .</p>

<p>I've come across with a few questions regarding the book, and Examples 5-20, 5-21 Touch functions in the book;</p>

<p><strong>Q1</strong>. First of all, is there anywhere to post, discussions going on, issues addressed about the book other than the forum here?</p>

<p><strong>Q2</strong>. Found out function 'touchIsDown' ('touchIsStarted' in code examples <a href="https://github.com/lmccart/gswp5.js-code" target="_blank" rel="nofollow">https://github.com/lmccart/gswp5.js-code</a>)is no longer available, but updated to 'touchStarted' according to the Reference. Is it right?</p>

<p><strong>Q3</strong>. No particular instructions how to try these touch function examples given in the book. Can anyone suggest how or where to look at?</p>

<p><em>Here are the codes of Example 5-20 and 5-21;</em></p>

<p><em>:::5-20:::</em></p>

<pre><code>function setup() {
  createCanvas(240, 120);
}

function draw() {
   background(204);
   line(20, 20, 220, 100);
   if (touchIsDown) {
     line(220, 20, 20, 100);
   }
 }
</code></pre>

<p><em>:::5-21:::</em></p>

<pre><code>function setup() {
  createCanvas(480, 120);
  fill(0, 102);
  smooth();
  noStroke();
}

function draw() {
  ellipse(touchX, touchY, 15, 15);
}
</code></pre>

<p>thx!</p>
]]></description>
   </item>
   <item>
      <title>touchEnded() fires "evt is undefined"</title>
      <link>https://forum.processing.org/two/discussion/20372/touchended-fires-evt-is-undefined</link>
      <pubDate>Fri, 20 Jan 2017 11:03:51 +0000</pubDate>
      <dc:creator>Eispfote</dc:creator>
      <guid isPermaLink="false">20372@/two/discussions</guid>
      <description><![CDATA[<p>Hey,</p>

<p>I use in my programm  touchEnded(), touchMoved() and touchStarted(), but touchEnded() makes problems.
I tried to make a easier code example, but its the same. :/ 
I get this error (TypeError: evt is undefined) in this simple example:</p>

<p><code>function touchMoved() {
  console.log("moved");
  return false;
  }
function touchStarted() {
  console.log("started");
  return false;
  }
function touchEnded() {
  console.log("ended");
  return false;
  }</code></p>

<p>If I touch and release directly, than I get all the console log entries. But if I moved while touching and stop it, then I never get the console log with "ended". Why?</p>

<p>Thank you!
Eispfote</p>
]]></description>
   </item>
   <item>
      <title>a</title>
      <link>https://forum.processing.org/two/discussion/19922/a</link>
      <pubDate>Mon, 26 Dec 2016 01:06:03 +0000</pubDate>
      <dc:creator>ericmorgan1</dc:creator>
      <guid isPermaLink="false">19922@/two/discussions</guid>
      <description><![CDATA[<p>a</p>
]]></description>
   </item>
   <item>
      <title>How to work with multitouch?</title>
      <link>https://forum.processing.org/two/discussion/17058/how-to-work-with-multitouch</link>
      <pubDate>Thu, 09 Jun 2016 07:34:24 +0000</pubDate>
      <dc:creator>laurage</dc:creator>
      <guid isPermaLink="false">17058@/two/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>I am developing a sketch for a multitouch touch screen.</p>

<p>I don't understand how to use the variable touches[]. Could someone give me an example?
Is it created automatically when touching the screen? Do I have to fill it manually with touchX, touchY? How do you access its elements and its elements coordinates?</p>

<p>My sketch (at the moment emulated with mouse + keypress) has two classes (Blop and Being). Every time a user touches the screen, a blop is generated. Blops are generated in the array created in a Being. This goes on until the user takes off all their fingers from the screen.
At that point the first being with its associated blops gets a life of its own, and a new being is created, and stored in an array in the main sketch. 
I am not sure where I should insert the touches[] variable. Should it replace one of my existing array? (Happy to post the code if needs be, but I think it's more a question of understanding what touches[] is and how it integrates in my architecture)</p>

<p>Thanks!</p>
]]></description>
   </item>
   </channel>
</rss>