differentiate between links in text?
Posted: Sat Oct 09, 2010 7:07 am
Hi,
I can't figure out how to have my mouseMove message differentiate between links.
I have been successful in creating a link from a word in a field of text (thanks to visitors to my previous post), and I have even figured out how specify the destination of each link; ie: Link1 goes to Card 1 and Link2 goes to Card 2. See code below.
As you can see above, I need to display an "information card" when the mouse hovers over the links. If I have two or more different links in my text field, then I need different information cards to display depending on the link in question. I can make my information card display with All links (as above), but can't figure out how to make it specify one from another.
Any ideas?
I can't figure out how to have my mouseMove message differentiate between links.
I have been successful in creating a link from a word in a field of text (thanks to visitors to my previous post), and I have even figured out how specify the destination of each link; ie: Link1 goes to Card 1 and Link2 goes to Card 2. See code below.
Code: Select all
on mouseMove
if the mouseChunk is not empty and the textStyle of the mouseChunk contains "link" then
lock cursor
set the cursor to hand
show group "InfoCard"
else
unlock cursor
end if
end mouseMove
on mouseLeave
unlock cursor
hide group "InfoCard"
end mouseLeave
on linkClicked theText
if theText is "backwards" then go to card 1
if theText is "forwards" then go to card 2
end linkClicked
Any ideas?