macromedia.director.lingo
[Top] [All Lists]

Re: Bottom aligning text

Subject: Re: Bottom aligning text
From: "Darrel Hoffman"
Date: Wed, 9 Apr 2008 10:44:34 -0400
Newsgroups: macromedia.director.lingo

> Since you need the text box to behave in a completely different way than 
> it was designed to do, I wouldn't consider it to be a 'hack-job'. I would 
> call it 'creative coding'. ;-)

It's weird when you think about it - starting text at the bottom used to be 
the standard back in DOS days (Well, maybe Apple DOS - Just pulled up an MS 
DOS Prompt and it starts at the top, though maybe it was different before 
Windows?  I forget.)  And most chat programs I've seen preserve that 
arrangement.  Since I want this to not just BE a chat window but very 
specifically LOOK like a chat window (fits the style of the project in 
general, kind of a retro/futuristic Enter The Matrix type world), I think I 
should work to make that behavior reflect properly in the game.

> You could set the member's boxtype to #fixed (which won't show scrollbars) 
> then switch it to #scroll when there are twenty one or more real lines of 
> text.

Could work, though counting lines can be tricky if somebody enters enough 
text to wrap onto a second (or third+) line.  Director seems to count the 
number of RETURNs in a text field rather than the number of actual lines 
when you ask for a member(X).line.count.  I'll probably end up replacing the 
default scrollbar with my own custom graphics for scrolling, so that might 
not be an issue ultimately.

> I have a similar 'chat' text member, I just never was concerned with the 
> text starting at the top, or having the disabled scroll bars before the it 
> was full. I do employ a fairly simple way of keeping the most recent text 
> at the bottom once it fills up:
>
> member("SomeMemberName").scrollTop = member("SomeMemberName").height - 
> sprite(someSpriteNum).height

I think if I have the scrolling controlled by my own custom graphics, 
something like that might do the trick. 



<Prev in Thread] Current Thread [Next in Thread>