Groups | Blog | Home
all groups > flash (macromedia) > march 2004 >

flash (macromedia) : TextArea Solutions and Problems


MacGyver_97
3/3/2004 10:25:47 PM
Hello;

I've been experiencing problems with the TextArea component, and through
research, I've pretty much figured them out. Since many of you are
experiencing the same problems, I've decided to post solutions. There is one
lingering problem which I'd like help on. But first, here are some solutions:

Suppose your TextArea component is called "news". Typically, these components
will load external files, be it HTML or XML.

To get rid of borders around the TextArea:
news.setStyle( "borderStyle", "none" );

To get rid of a green border that may appear around your TextArea when
scrolling:
news.drawFocus = null;

To prevent hilighting the entire TextArea accidentally (when scrolling)
news.focusTextField = null;

Hope this helps so of you.

My problem is that I want to force the TextArea to always be at its topmost.
I have a timeline in which choosing a menu option advances the timeline between
two TextAreas. Suppose you scroll down in the first area. When you advance to
the second area, the scroll bar isn't at the top, it's where you left it from
the first area (even though the second area has been loaded with new content).

Can anyone help me force the scoll bars to always be at the top when loading
new content?

Thanks,
Neal.



jerreye04
3/4/2004 1:04:44 AM
Nice fix on the TextArea. I just fixed the same issue using "_lockroot=true" on
the MC that holds the TextArea....seems to work too. But I like this new "fix"
better :)

If you want the top line of the text to be displayed I think you can use this
script on the frame where your TextArea rests:

myTextArea.vPosition = 0;

This will make it "refresh" whenever the timeline stops on that frame (I
think). Won't hurt to try.

MacGyver_97
3/4/2004 2:50:22 PM
Thanks, buddy. This worked like a charm.

I might be wrong, but the scrollbar might also reset itself to the top if the
TextAreas have different instance names too. This would fool Flash into
thinking that it's a brand new TextArea and forget about where the scrollbar
was on the previous instance. Haven't tried it though...

Neal.

PS: By the way, the work I'm doing is for my own corporate website,
[L=http://www.reddreamstudios.com]http://www.reddreamstudios.com[/L]. The
updated site with all the Flash trimmings (and TextAreas) will be live in a few
weeks.
AddThis Social Bookmark Button