This content has been marked as final. Show 6 replies
If you text doesn't scroll, then you could use the invisible button technique. You can use the toolbox rectangle tool to draw an empty borderless rectangle over the underlined text. Then you can use the sprite... intersects... method to detect when the one sprite touches the second sprite.
select the text you want to underline then use the hyperlink field in the property inspector and type in some identifier (here's where you have to do some planning as I have no idea what you mean by 'feedback in some way.')
Then, put this handler in a movie script:
on hyperlinkClicked data, range
All the information about setting up hyperlinks in text members can be found in Director's help. Make sure you're using the toolbar in classic mode for Director's text members and NOT the flash components.
Hi Guys, Thanks for the input. Unfortunately the text will scroll, and I am not using the cursor as the pointer. The pointer is a sprite. The cursor will be clicking buttons which moves the sprite (I’m trying to mimic an existing system here …).
Yeah, I’ve not sorted out the feedback bit yet, text color change or background color change or ...., it just depends what works/is possible.
Oh, and it is not a real hyperlink, I just want to infer one.
On "hyperlink" selection we will jump to an appropriate point in the score. This is a totally enclosed system and is being built to test real product. I could custom build each page that contains links but I wondered if I could generate a more flexable / re-usable version. b.
You'll have to monitor the sprite location regularly, in an #enterFrame
handler, for example, and check this against the fontStyle of the
member's text. Something like the following might get you started
(completely untested email lingo):
on beginSprite me
my = sprite(spriteNum)
myTextSprite = sprite(10) -- alter spriteNum to suit
myTextMember = myTextSprite.member
on enterFrame me
tLoc = my.loc
tWord = myTextSprite.pointToWord(tLoc)
if tWord > 0 then
tStyle = myTextMember.word[tWord].fontStyle
if tStyle.getPos(#underline) then
-- your sprite is over an underlined word
Hi Rob, Chunick and Sean, thanks for your time, and comments. I’ve sort of run out of time on this so scrolling stuff as discrete chunks. Drowning in ‘if then else’ statements ;-) However I've saved your input to my scrapbook, so will have a play when a gap appears in my space time continuum. Your thoughts are not lost. b.