home *** CD-ROM | disk | FTP | other *** search
- Organization: Doctoral student, English, Carnegie Mellon, Pittsburgh, PA
- Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!ch2i+
- Newsgroups: comp.sys.mac.hypercard
- Message-ID: <oeR3hvy00WBN43zkoA@andrew.cmu.edu>
- Date: Mon, 27 Jul 1992 14:07:55 -0400
- From: "Charles A. Hill" <ch2i+@andrew.cmu.edu>
- Subject: identifying black pixels?
- Lines: 45
-
- Hi:
-
- I want users to be able to click on a part of a line drawing, and have
- that part of the drawing "flash" by having it filled in and emptied
- repeatedly several times. For instance, in a drawing of a cell, the
- user could click inside the nucleus, and the nucleus would "flash" 3
- times.
-
- I have a script that goes something like this:
-
- on mouseup
- get the mouseloc
- put it into clickPoint
- choose bucket tool
- repeat 3
- click at clickPoint
- wait 5
- domenu undo
- wait 5
- end repeat
- choose browse tool
- end mouseup
-
- The trouble is, sometimes the user clicks on a black pixel (there's lots
- of detail and "texture" in the drawings). When this happens, the bucket
- shows up and goes away, but nothing gets filled in.
-
- Is there a way to tell hypercard, "If the pixel at clickPoint is black,
- move over one pixel?"
-
- I've solved the problem by specifying x and y coordinates in the code,
- but the code is way too long, and every time I move the drawing over a
- quarter inch, I have to recode the whole card.
-
- *Of course, if HC had irregular shaped buttons, this wouldn't be a
- problem. (Hint for the next update.):-)
-
- Charlie Hill
- ch2i@andrew.cmu.edu
-
-
-
-
-
-
-