Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: "MicroWorlds Forum" <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: MIA, Ask an Expert: Mouse clicks
From: "Daniel Ajoy" <da.ajoy@xxxxxxxxx>
Date: Wed, 29 Feb 2012 00:46:17 -0500

On Wed, 29 Feb 2012 00:33:26 -0500, Alan Bartram <at.bartram@xxxxxxxxxxx> wrote:

My mistake this is an example of what I've been using:

to controlfire
tto [t1 t2]
make  "com ascii readchar
if :com = 37 [seth 270 fd 5]
if :com = 39 [seth 90 fd 5]
if :com = 32 [tto "t2 seth 0 st repeat 45[fd 7 wait .5] test]
controlfire
end

As you can see ascii character 37 relates to the left arrow
39 to the right arrow and 32 to the space bar. Can I use an ascii number
for the left mouse click?

No.


You can use OnClick events. For example, the OnClick events of a background color, like in the project I mentioned

http://mia.openworldlearning.org/mwforum/msg04176.html

Or the OnClick event of a turtle that is always beneath the mouse, like in the project attached.

Daniel
OpenWorld Learning

Attachment: clickOnCrossHairs.mwx
Description: application/mwx-plugin


  • Previous by thread: Re: MIA, Ask an Expert: Mouse clicks
  • Next by thread: NXT Intelligent Brick

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008