[thelist] dynamic text boxes
Chris Johnston
chris at fuzzylizard.com
Thu Sep 4 21:53:38 CDT 2003
Mark Joslyn wrote:
> I in a little bit of a bind...
>
> Situation:
> I have a dynamic text box (field1) that is inside a movie clip (recordMC)
> that is populated from an external .txt file. Everything is loading
> perfectly, Now comes the tricky part - I want to now add formatting to the
> text. I want the text to come in bold. Then when a user clicks a button, the
> bold is turned off.
>
> Problem:
> I cannot get the dynamic text box to accept any formatting commands. It
> seems like the only way to get formatting to work is if I created a text box
> with actionscript instead of drawing one on the stage.
>
I am assuming that you have given the textbox a name, myText_txt and you
are trying to access it via myText_txt.text._style or something like that?
The following set of code seemed to work for me. I was just playing
around though.
myText_txt.text = "hello world";
myText_txt.textColor = 0x000077;
myText_txt.onSetFocus = function() {
myText_txt.textColor = 0x005500;
}
But when I set focus to the text block it changed the color for me. I
did not see a property for bold or font weight though. That may be part
of the problem.
--
Chris Johnston
chris at fuzzylizard.com
www.fuzzylizard.com
More information about the thelist
mailing list