There is one other method you can try,

property pSprite

on beginSprite me
  pSprite = sprite(me.spriteNum)
end beginSprite

on mouseWithin me
  vLine = the mouseLine
  vCharCount = 0
  repeat with i = 1 to vLine -1
    vCharCount = vCharCount + member(pSprite.member).line[i].char.count +1
  end repeat
  vLineCharCount = member(pSprite.member).line[vLine].char.count + 1

member(pSprite.member).char[vCharCount+1..vCharCount+vLineCharCount].hilite(
)
end mouseWithin

How it works, you want to hilite an entire line, you must hilite every
character of that line. However, when you count the characters of a line
either using the member(someMember).line[x].length or
member(someMember).line[x].char.count you will get the number of visible
characters on the line including spaces, however what you don't see is the
return character. If you manually add a single number to the length of each
line then you will be including the return character and if you hilite
characters 1 to the and including the return character, you will in effect
hilite the entire line to the width of the field. However, I know of no easy
way of calculating the character count without using a repeat loop to get
the characters up to the first character of a line, hence the repeat loop in
the above example.

Hope it helps.

Sincerely

Mark

--------------------------------------------
Mark R. Jonkman
Mark R. Jonkman Consulting
ADDRESS: 20 Windermere Crt., Guelph, ON, CANADA N1E 3L4
PHONE: 519-837-8509
EMAIL: [EMAIL PROTECTED]
--------------------------------------------

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Ask Møller
> Sent: Wednesday, October 11, 2000 9:09 AM
> To: [EMAIL PROTECTED]
> Subject: Re: <lingo-l> Hilite line command
> Importance: Low
>
>
> > When using hilite line in conjunction with the mouseLine
> command, Director
> > only seems to hilite the total length of the character string
> on the given
> > line with exception to the last line in the field which spans the total
> > width of the field. How can I force Director (if possible) to
> hilite at the
> > total width of the field on all lines?
> >
> > Dave.
> >
> >
> By using a shape, cos hilite can only hilite "chars"... if you want to
> hilite the intire line you will need to fill it with "space"s...
>
> Ask
>
> .....ULTIMATUM........
>  Ask Møller - Lingo++
>   [EMAIL PROTECTED]
>   Tlf. 33 25 21 12
>  Mobil 26 72 21 15
> ......................
>
>
> [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!]
>


[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!]

Reply via email to