> Good to hear that! Would you mind sharing your solution, or at least its
> direction? There are so many things that "with imaging Lingo"
> might mean :-)
OK. Here's the process I used:
In a behavior attached to the block of text I create an image in the
beginSprite handler and store it as a property
-- create image object:
pImage = image(1, 1, 16)
-- fill it with the appropriate color:
pImage.fill(0, 0, 1, 1, [#shapeType: #rect, #lineSize: 0, #color: rgb(255,
0, 0)])
In the mouseDown handler, find which word was clicked:
-- which word (number) was clicked?
tWord = pSprite.pointToWord(cLoc)
-- move the hilite image so it sits over the word clicked:
charCount = pMember.text.word[1..tWord].char.count + 1
thisWord = pMember.word[tWord]
len = thisWord.length
firstCharPos = pMember.charPosToLoc(charCount - len)
lastCharPos = pMember.charPosToLoc(charCount)
-- create rect dimensions and pad it
-- for character ascenders/descenders
-- (this relies on storing the sprite's left
-- and it's lineHeight as properties)
l = firstCharPos[1] + pLeft
r = lastCharPos[1] + pLeft
t = firstCharPos[2] + 7
b = t + pLineHeight - 5
-- copyPixels to the stage
(the stage).image.copyPixels(pImage, rect(l, t, r, b),\
pImage.rect, [#ink:37])
Hope that helps,
-Sean.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]