Still working on my project. I need some help with this.
I have a dynamic textbar connected to an onscreen keyboard, and I need the font to decrease in size depending on the number of characters you enter.
Seems like it could be a simple algorithm but I have no clue where to start.
If you are using a textfield you can check its length property to know how many characters are in it. To change the font size you'll need to use the TextFormat class and the setTextFormat() method of the TextField class.
assign a textformat to your textfield and add a change listener to your textfield. in the listener function adjust the textformat's size property per your needs and reassign the textformat to your textfield.
If you are using an onscreen keyboard, I am not sure that a CHANGE listener will work if it involves adding text to the textfield with code... but kGlad will know better about that. If it does involve code, whatever code adds text can have the task of checking the length right after each character is added.
To check the textfield's character count by its length property, basically use something similar to...
numCharacters = yourTextfield.length;