Good night everyone!
Im using an maskedTextInput component to mak field like CEP, etc. it
works really well!!! but I need one mask
for financial values and have a good precision. could anybody help
me? i tried to do the way its shown down below
but it didnt work. when mopre than 5 digits are entered the numbers
disapear!!
Here's the code:
Function:
__________
private function Format(campo:TextInput):void {
var temp:Number = Number(campo.text);
campo.text = moeda.format(temp);
}
__________
Components:
<mx:CurrencyFormatter id="moeda" precision="2"
currencySymbol="" decimalSeparatorFrom="."
decimalSeparatorTo="." useNegativeSign="true"
useThousandsSeparator="true" alignSymbol="left"/>
<mx:TextInput id="nome" maxChars="30" width="100%" keyUp="FOrmat
(nome)"/>
Could Anybody help me?
I apreciate your atencion!!!
[]'s
Rafael