<?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[鼠标的x坐标、y坐标]]></title><description><![CDATA[<h2><a class="anchor-offset" name="介绍"></a>介绍</h2>
<p dir="auto">可以用侦测类别的如下2个报表积木获取鼠标指针的当前位置：</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/8e028497-581f-45dc-bdb0-ac4fc1e7dda1.png" width="450" style="border-radius:5px;border:1px solid #29622d" /></p>
<p dir="auto"> </p>
<p dir="auto">在<a href="/topic/601/x%E5%9D%90%E6%A0%87-y%E5%9D%90%E6%A0%87">这篇文章</a>已经提到，舞台上的x坐标介于-240和240之间，y坐标介于-180和180之间。</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f035a443-0996-49ce-b7c2-d96ef774935b.png" alt="3cb12307-022d-43a5-a4b0-9427f70dd1d5-image.png" class=" img-responsive img-markdown" width="539" height="412" /></p>
<p dir="auto"> <br />
当你点击代码编辑器中的积木“鼠标的x坐标”，由于鼠标已经超出舞台边缘，其值就是舞台的下限，即-240：</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/e04f0045-2e67-4399-a1ee-bff70907aba0.gif" width="650" style="border-radius:5px;border:1px solid #29622d" /></p>
<p dir="auto"> <br />
 </p>
<h2><a class="anchor-offset" name="重复说鼠标位置"></a>重复说鼠标位置</h2>
<p dir="auto">可以用如下代码在一个“重复执行”循环中重复说鼠标位置：</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/d0c29980-1170-4686-bffc-db04da26ff5f.gif" alt="Animation2.gif" class=" img-responsive img-markdown" width="1359" height="510" /></p>
]]></description><link>https://forum.creaticode.com/topic/702/鼠标的x坐标-y坐标</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 18:20:48 GMT</lastBuildDate><atom:link href="https://forum.creaticode.com/topic/702.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Oct 2022 15:01:05 GMT</pubDate><ttl>60</ttl></channel></rss>