Highlighting Text on MouseOver |
|
on mouseMove
-- first unhighlight the "old" phrase if necessary
if the storedHilitedChunk of this stack is not empty \
and the storedHilitedChunk of this stack is not the mouseChunk then
do "set the backgroundColor of" && \
(the storedHilitedChunk of this stack) && "to empty"
set the storedHilitedChunk of this stack to empty
end if
if the mouseChunk is not empty \
and "link" is in the textStyle of the mouseChunk then
set the storedHilitedChunk of this stack to the mouseChunk
-- save for later unhighlighting
set the backgroundColor of the mouseChunk to "yellow"
end if
pass mouseMove
end mouseMove
on mouseLeave
if the storedHilitedChunk of this stack is not empty then
do "set the backgroundColor of" && \
(the storedHilitedChunk of this stack) && "to empty"
set the storedHilitedChunk of this stack to empty
end if
pass mouseLeave
end mouseLeave
Posted 2/8/2002 by Jeanne DeVoto to the Use Revolution List
(See the complete post/thread)