Ask a Question related to Macromedia Director Lingo, Design and Development.
-
h #1
How to find rects of hyperlinks within a block of text?
Hi,
In order to increase display speed of large scrollable blocks of rich text,
I'm grabbing their image and then using imaging Lingo to display it. For
this solution to work for our project, though, I need to find a way to
support hyperlinks within the text.
I reckon I can handle the on enterFrame stuff to check whether the mouse is
over one or not - if I have a Hotspots proplist containing the rects of all
the hotspots in an image then
<ultrapseudocode>
on enterframe me
if mouse has moved since the last enterframe then
work out where mouse is relative to image reg. point
repeat with each rect in Hotspots list
if rect is within view (i.e. not scrolled off the page
somewhere)
if mouse is in the rect then
woohoo!
etc
</upc>
but I've no idea how to populate the Hotspots list in the first place. I
know there's a way of finding out if a particular word is under the mouse,
and I can certainly find the hotspots within the text but...
Any suggestions, pointers much appreciated.
h
h Guest
-
Centering text vertically in a text block
I just bought Freehand MX 11 for Mac OS X and from using it back in the mid 1990s I could have sworn you could center text vertically in a text... -
Flash Text Hyperlinks
I have some text in flash that's scrolling and hyerlinks, now that I brought the swf file into director, the hyperlinks don;t work. HELP!!!! J -
Missing text (flush right text block) upon export to pdf
I was aghast today to see and ad in the local paper (that I worked on and got client approval for) missing text at bottom of ad. I am using FH 10 in... -
how to add several hyperlinks to a text?
in article bi7l05$1ru$1@forums.macromedia.com, SimonBaum at webforumsuser@macromedia.com wrote on 8/23/03 8:00 AM: Assuming that works (I... -
find physical blocks/disks, mapped from Oracle file# and block#, block corruption
Hello "lopera" <prlopera@techie.com> schrieb im Newsbeitrag news:3E1C7C00.9090402@techie.com... I think that we need a bit more data here.... -
JB #2
Re: How to find rects of hyperlinks within a block of text?
While text is a text member get it's hyperlinklist
hl = member("Glossary").hyperlinks
-- [[3, 8], [10, 16], [41, 54]]
boxLeft = charPosToLoc(member,"Glossary" hl[3][1]) -- 3rd link
This basic code could get the start and end char of hyperlinks, just
need to guess or get the line height the establish line height, and
maybe get position of char after link end to establich box right
should be able to generate a reasonable hyperlink rect list with this
approach., thickey thing would be a hyperlink that word wraps over 2
lines.
JB Guest
-
Rob Dillon #3
Re: How to find rects of hyperlinks within a block of text?
If you are displaying a bitmap image as the text, then just use some
toolbox sprites to create those hot spots. Select the empty rectangle
tool, specify a line width of no width and draw a rectangle around the
string that you want to use as a link. This will draw a new sprite on
the stage and create a new shape member. Attach a behavior to that
toolbox sprite to open the URL. Repeat as necessary.
--
Rob
_______
Rob Dillon
Team Macromedia
[url]http://www.ddg-designs.com[/url]
412-243-9119
[url]http://www.macromedia.com/software/trial/[/url]
Rob Dillon Guest
-
h #4
Re: How to find rects of hyperlinks within a block of text?
"Rob Dillon" <rob@ddg-designs.com> wrote in message
news:301020030852275851%rob@ddg-designs.com...Thanks Rob - I'd already considered creating the Hotspots manually but with> If you are displaying a bitmap image as the text, then just use some
> toolbox sprites to create those hot spots. Select the empty rectangle
> tool, specify a line width of no width and draw a rectangle around the
> string that you want to use as a link. This will draw a new sprite on
> the stage and create a new shape member. Attach a behavior to that
> toolbox sprite to open the URL. Repeat as necessary.
over 1400 'text-images', each with somewhere between none and 20 hotspots I
wanted to find a way of doing it dynamically/programmatically. Plus the
bitmap images *may* be larger than the area I have to display them in so I
have to be able to scroll them. Then we're back to the reason I need to use
images rather than just text boxes - scrollable text is too damn slow! Have
to use imaging lingo just to get decent performance. Plus the client has
started delivering assets that have images embedded in the text so a custom
display mechanism is the only way.
If I can't find a way of getting Director to do it on the fly I'll write a
tool in Director to allow one of our art-gophers to mark out hotspots
quickly as they're putting all the text in.
Many thanks anyway,
h
h Guest
-
Rob Dillon #5
Re: How to find rects of hyperlinks within a block of text?
If you're working with that much content then you might want to
consider using Flash .swf files for each of the text members. You can
set all of your hyperlinks right in the flash file.
Link, rather than import the flash .swf into your Director movie. Then
you can use it just like the bitmaps that you have now. Since the Flash
..swf is linked, the hyperlink will still function.
I would use a link to a Director function and not just use a URL in the
Flash .swf. In the Director function you can better control opening the
browser.
--
Rob
_______
Rob Dillon
Team Macromedia
[url]http://www.ddg-designs.com[/url]
412-243-9119
[url]http://www.macromedia.com/software/trial/[/url]
Rob Dillon Guest
-
h #6
Re: How to find rects of hyperlinks within a block of text?
"JB" <lingoguy@sbcglobal.net> wrote in message
news:lingoguy-480B4A.01384530102003@forums.macromedia.com...<snip>> While text is a text member get it's hyperlinklist
>
> hl = member("Glossary").hyperlinks
> -- [[3, 8], [10, 16], [41, 54]]
>
>
> boxLeft = charPosToLoc(member,"Glossary" hl[3][1]) -- 3rd link
>
> This basic code could get the start and end char of hyperlinks, just
> need to guess or get the line height the establish line height, and
> maybe get position of char after link end to establich box right
Thanks for this, JB, am experimenting with charPosToLoc.
h
h Guest
-
h #7
Re: How to find rects of hyperlinks within a block of text?
Rob Dillon <rob@ddg-designs.com> wrote:
I've tried a few experiments with Flash but it just can't handle the> If you're working with that much content then you might want to
> consider using Flash .swf files for each of the text members. You can
> set all of your hyperlinks right in the flash file.
shifting of big bitmaps. We need to be able to scroll long (i.e. several
screens' worth) chunks of rich text and images for our projects, in windows
around 550-600px square. Neither Flash nor Director will let me do that
smoothly, but we're faced with clients and users who are used to
web-browsers routinely and effortlessly scrolling through enormous chunks of
really rich media in web-pages... hence imaging lingo and an attempt to
reproduce some standard UI things with new speedier behaviours.
[rant]
Most of our work with Director seems to involve displaying (and/or printing)
documents at some point or another. To have to fall back to PDFs and an
external program not under projector control is painful...
[/rant]
In the absence (AFAIK..?) of robust cross-platform HTML or PDF solutions for
Director, am still pursuing JB's charPosToLoc suggestion :)
Many thanks,
h
h Guest



Reply With Quote

