I have an input text field in Flash and I want to keep a dollar sign at all times in front of it.
Normally I would just left align the input field and have a “$” next to it so it’s uneditable, but in this instance the text field has to be center aligned.
I thought to just include a function to add “$” in front of all the text every time the field loses focus – but realised that would be a problem if there was already a $ sign in front and it just kept adding them.
Also – once I’ve done this, is there a way to grab the value from that input field excluding the “$”? Eg: some sort of splice that splices the first character and just grabs the rest of it.
To keep the $:
And to get the text without the first character: