Here's a quick way just to see what Tab and others are suggesting here
as to how you can use just one channel for the line. It's a frame
script, hardwired to sprite 1. It uses mouseLoc for rollover detection,
the clickLoc could be incorporated as well. *You* of course would
construct an object to deal with everything ;-) (I'm in digest mode, so
if similar has been posted already, sorry!)

Only requirement for this is a bitmap in sprite 1 and putting the code
in a frame script. Put lotsa' solid colors or shapes in the bitmap,
numbers returned will vary based on depth, 8 bit to start may be easier
to work with. Higher frame rates will catch more loc changes for this
snippet, very small (~3 pixel) lines may be hard to detect with quick
movement. Watch for email line breaks.

property pLastColor, pOffset, pSpriteImageRef, pInitFlag

on exitFrame me
     if voidP(pInitFlag) then
       pLastColor = 0
       pOffset = point(sprite(1).left,sprite(1).top)
       pSpriteImageRef = sprite(1).member.image
       pInitFlag = 1
     end if
     offsetMouseLoc = the mouseLoc - pOffset
     currentColor = pSpriteImageRef.getPixel(offsetMouseLoc, #integer)
     if currentColor <> pLastColor then
       put currentColor
       pLastColor = currentColor
     end if
     go the frame
end

Many other possibilities here by referencing different castmembers or 
images to change hotspot location, or line widths for different skill 
levels etc. Note what black and white return at various depths, as well 
as rolling off stage.

As an aside, having getPixel() now reminds me of the best all-time
Director tip I've ever seen. That was the RAW text method by Steve
Gerber (I think) way back when we only had 24(?) channels in D4.

And oh, hi list, been away for awhile, nice to still see some familiar
names.

jb



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to