Scott,
[quoted text, click to view] > 1) If I change it to dynamic, how do I go about changing
> the color?
You may have seen some of this in your experimentation with the
TextFormat class. Basically, you instantiate a TextFormat object ...
var fmt:TextFormat = new TextFormat();
Then you set the color property of that instance.
fmt.color = 0xFF0000;
In this case, the 0x is like the # in HTML hexadecimal colors: it lets
Flash know, "Hey, the following characters are a hexadecimal number," and
FF0000 is red.
Finally, you invoke the TextField.setTextFormat() method on your
TextField instance. This is why the text field has to be dynamic (or
input), rather than just static text. Non-static text is an instance of the
TextField class, which means you can give that instance an instance name --
which you can do by selecting the text field and directing your attention to
the Property inspector -- then using the TextFormt instance as the parameter
of the described method. e.g., if your text field's instance name is myText
....
myText.setTextFormat(fmt);
All together, now ...
var fmt:TextFormat = new TextFormat();
fmt.color = 0xFF0000;
myText.setTextFormat(fmt);
In ActionScript, classes define objects, and objects are what you
manipulate with ActionScript. Classes define properties (characteristics),
methods (things the object can do), and events (things the object can react
to), and the ActionScript 2.0 Language Reference is strongly organized
around classes.
[quoted text, click to view] > 2) is there a downside to using dynamic text rather
> than static?
Six of one, half a dozen of the other. Static text embeds font outlines
automatically, so you can rotate static text (for example) and still see the
text. Dynamic text won't do that unless you ask it to (see the Embed button
on the Property inspector, of the TextField class in the reference).
[quoted text, click to view] > 3) what if I convert the text to a graphic instead? Any
> reason not to go that route?
Convert it to a movie clip, and you have access to all the feature of
the MovieClip class. Convert it to a graphic symbol, and there is no
corresponding Graphic class (just as there is not StaticText class). Just
one of those things. ;)
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/ "Luck is the residue of good design."