Hi Andrew!
I remember implementing the same thing once for a CD. It was in D 8.5
though. I'll check and send u a sample soon.
Very broadly, I remember creating a property list of the hyperlink data on
prepareframe. On mousemove and on mouseup I retrived the number of the char
over which the mouse is (pointToChar)and parsed through the property list to
get the hyperlink.
As for (b), I wrote a behaviour which is something like this:
global gLinkList
property pSpriteNum, pPrevState, pCurrentState
on beginsprite me
pSpriteNum = me.spritenum
pPrevState = "NF"
pCurrentState = "NF"
end
on exitframe
pPrevState = pCurrentState
mousePoint = the mouseLoc
currentMember = sprite(pSpriteNum).member
charNum = sprite(pSpriteNum).pointToChar(mousePoint)
repeat with lintCtr = 1 to gLinkList.count
init = getaProp(gLinkList[lintCtr],#init)
term = getaProp(gLinkList[lintCtr],#term)
if ((charnum>=init) and (charnum<=term)) then
pCurrentState = "F"
exit repeat
else
pCurrentState = "NF"
end if
end repeat
if (pPrevState = pCurrentState) then
nothing
else
if (pCurrentState = "NF") then
sprite(pSpriteNum).cursor=0
else
sprite(pSpriteNum).cursor=[member("cstBmpHand"),member("cstBmpHandMask")]
end if
end if
end
You will need to keep track of the previous state. Otherwise the cursor will
keep changing between the hand cursor and normal one. The result was quite
satisfactory.
Thanks and Regards,
Anand Ravi
----- Original Message -----
From: "Andrew Dempsey" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED] Com" <[EMAIL PROTECTED]>
Sent: Monday, June 09, 2003 1:50 AM
Subject: Re: Re: <lingo-l> Getting rid of hypertext underline
> Hey Anand,
>
> Thanks for the response. I have written a couple of custom behaviors,
> but
> haven't been able to emulate (a) the speed with which the
> hyperlinkstyles
> cause the letters to highlight, and (b) the cursor changing to the
> pointed
> finger over text. I'm using DMX, windows 2000, working on a #text
> member.
>
> In regards to (a), when I set *chunk*.color=rgb(n,n,n) it looks fine,
> but
> I find that putting this inside an exitframe handler makes the response
> time of the link changing color slightly slower than when the hyperlink
> styles are in effect. If the mouse moves quickly over the text, not all
> lines highlight due to the limitation of checking once per frame.
>
> As for (b), I can't figure out how to make the cursor change when it's
> over actual text only, not just the text member as a whole. In other
> words, I don't want to have a finger cursor over any of the white space
> in the member.
>
> Looking forward to hearing more from you or others,
>
> Andrew
>
>
>
> >Hi!
>
> >You need to deselect the use hypertext styles cast member property.
> >You can then use a custom behaviour to capture the hyperlink clicked
> event.
>
> >Thanks and Regards,
> >Anand Ravi
>
> -----------------------------------------
> Andrew Dempsey
> ICT and Education Consultant
> Cairo, Egypt
> [EMAIL PROTECTED]
> www.andrewdempsey.com
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.487 / Virus Database: 286 - Release Date: 6/1/2003
>
>
> [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/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/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!]