<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to run an action when touch on an image?]]></title><description><![CDATA[<p dir="auto">I am using an M5Dial and trying to run an action when an image is touched on the screen, but I cannot find a block to achieve this. I have looked online and I think there should be an "Events" heading under "Image" in the menu, but I don't see any options for this:<br />
<img src="/assets/uploads/files/1720776564810-33749fad-56be-4d5a-8e13-00a62ff2a834-image.png" alt="33749fad-56be-4d5a-8e13-00a62ff2a834-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I also can't find any substantial documentation for UIFlow 2 online either, it seems UIFlow 1 is well documented but not UIFlow2, where can I find the documentation to explain the different blocks? The tutorial is very basic</p>
]]></description><link>https://community.m5stack.com/topic/6627/how-to-run-an-action-when-touch-on-an-image</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 01:03:34 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6627.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Jul 2024 09:31:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to run an action when touch on an image? on Sat, 13 Jul 2024 08:50:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/120659">@mattarnold700</a> Looks like you need to define a touch zone around the image.</p>
<p dir="auto"><img src="/assets/uploads/files/1720860647920-screenshot-2024-07-13-at-09.50.20-resized.png" alt="Screenshot 2024-07-13 at 09.50.20.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/25830</link><guid isPermaLink="true">https://community.m5stack.com/post/25830</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 13 Jul 2024 08:50:50 GMT</pubDate></item><item><title><![CDATA[Reply to How to run an action when touch on an image? on Sat, 13 Jul 2024 08:18:34 GMT]]></title><description><![CDATA[<p dir="auto">I can't definitively say from the screenshot, but there might not be a specific block for detecting image touch in UIFlow 2.0. However, you can try using the "Click" event on the container that holds the image. Here's a possible solution:</p>
<ul>
<li>Add a container (like a Button or Screen) to your UIFlow project.</li>
<li>Place your image inside this container.</li>
<li>In the properties of the container, set the "Click Event" to trigger the action you want to perform when the image is touched.</li>
<li>This way, clicking anywhere on the container (which will also encompass the image) will trigger the event. It's not exactly detecting image touch, but it achieves a similar outcome like <a href="https://www.frelanhardware.co.uk/Products/hat-and-coat-hooks" target="_blank" rel="noopener noreferrer nofollow ugc">coat hooks single</a>.</li>
</ul>
<p dir="auto">If this doesn't work, you might need to explore alternative approaches like creating a custom component or using lower-level libraries that offer more granular touch event handling.</p>
]]></description><link>https://community.m5stack.com/post/25829</link><guid isPermaLink="true">https://community.m5stack.com/post/25829</guid><dc:creator><![CDATA[mattarnold700]]></dc:creator><pubDate>Sat, 13 Jul 2024 08:18:34 GMT</pubDate></item></channel></rss>