Before talking about the already finished prototype 0.3, I think it is better to pin point on the two troublesome items as stated in my heading. That is the TEXTFORMAT and STYLESHEET classes within Flash.
The reason that I want to talk about these is that these two little item (seems like little…) troubles me a whole week to work on it. I dont know why, however it seems that Macromedia do have a lot of bugs in these two classes.
First, let me introduce these two classes.
- A class that is used to apply text formats to a textfield on the stage
- It can be applied to the whole textfield, or a portion of it if specified
- Adv: It is easy to use and flexible because you can apply on anywhere
- Dis: It is hard to maintain and it requires great programming effort
- Alternative approach to apply text formats
- Apply to be whole textfield
- Adv: It is surely easy to maintain. Further it can be reused for HTML section
- Dis: The text content need to attach many tags in order to apply stylesheets
Okay, actually coding in both approarch is very simple. However there are tons of bugs came out which makes me crazy within this week. So I better mention in the web somewhere to let others preventing these traps.
If you are using dynamic textfields with embedded character, you CANNOT use STYLESHEET NOR TEXTFORMAT with FONT-FAMILY settings!!
- I put this one so seriously because this bug takes me nights to discover!!!!
- If you violate this, the text will simply not displaying… which you will never know that it is related to FONT-FAMILY until you delete your codes line by line…
- The possible reason probably is that embedded character will only embed for the current font, so… changing it will make the text simply gone…
- For the same reason… If you want to set Bold, Italic, etc. You HAVE to set it in the textfield beforehand. This will make sure that the embeded character will also embed those styles.
- Dynamic textfield means that the content of the textfield is defined by external codings.
- Embedded characters are essential for animations on textfields.And what I can suggest for future development is that…If you use dynamic textfields… try not to put animations… it will drive you crazy…