Making clickable text links in Rev
monte at sweattechnologies.com
Sun Aug 8 22:18:49 EDT 2010
Where there's a will there's a way.
For starters look at htmlText in the dictionary. If pre-parsing the text you want to put in your field and adding the links won't work then you might try checking out the mouseText and clickText functions. For this method let's say you had a list of words that you want to link to actions. You can create a custom property set in your field uLinkWord. The keys of the set are the words. The values are the handler you want executed if the word is clicked. Then the field script is something like this:
put the uLinkWord[the clicktText] of me into tAction
if tAction <> "" then dispatch tAction
If you want to use the same handler with the word as a parameter then just use a custom property with a list of words.
if the clicktText is among the lines of the uLinkWords of me then dispatch linkHandler with the clicktText
on linkHandler pWord
-- do what you want here
On 09/08/2010, at 11:59 AM, tech1 at troutfoot.com wrote:
> Hi folks,
> I can’t find this in the docs.
> Let’s say there’s a scrolling field with a few thousand words.
> Is there a way to make some words into clickable links, as in html web
> pages, without using their position?
> Because the text will be lengthy, and changed at various times, I want to
> avoid things like “...set the linkText of word 35429...“
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode