home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / hypercar / 2885 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.5 KB  |  55 lines

  1. Organization: Doctoral student, English, Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!ch2i+
  3. Newsgroups: comp.sys.mac.hypercard
  4. Message-ID: <oeR3hvy00WBN43zkoA@andrew.cmu.edu>
  5. Date: Mon, 27 Jul 1992 14:07:55 -0400 
  6. From: "Charles A. Hill" <ch2i+@andrew.cmu.edu>
  7. Subject: identifying black pixels?
  8. Lines: 45
  9.  
  10. Hi:
  11.  
  12. I want users to be able to click on a part of a line drawing, and have
  13. that part of the drawing "flash" by having it filled in and emptied
  14. repeatedly several times.  For instance, in a drawing of a cell, the
  15. user could click inside the nucleus, and the nucleus would "flash" 3
  16. times.
  17.  
  18. I have a script that goes something like this:
  19.  
  20. on mouseup
  21.    get the mouseloc
  22.    put it into clickPoint
  23.    choose bucket tool
  24.    repeat 3
  25.       click at clickPoint
  26.       wait 5
  27.       domenu undo
  28.       wait 5
  29.    end repeat
  30.    choose browse tool
  31. end mouseup
  32.  
  33. The trouble is, sometimes the user clicks on a black pixel (there's lots
  34. of detail and "texture" in the drawings).  When this happens, the bucket
  35. shows up and goes away, but nothing gets filled in.
  36.  
  37. Is there a way to tell hypercard, "If the pixel at clickPoint is black,
  38. move over one pixel?"
  39.  
  40. I've solved the problem by specifying x and y coordinates in the code,
  41. but the code is way too long, and every time I move the drawing over a
  42. quarter inch, I have to recode the whole card.
  43.  
  44. *Of course, if HC had irregular shaped buttons, this wouldn't be a
  45. problem.  (Hint for the next update.):-)
  46.  
  47. Charlie Hill
  48. ch2i@andrew.cmu.edu
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.