Re: [Flashcoders] hi.. need help asap.. newbie here.. hehe

2008-05-15 Thread Kenneth Kawamoto

Should be Number(age.text) for a start

Kenneth Kawamoto
http://www.materiaprima.co.uk/

rlyn ben wrote:

need to capture the input in textfield which is restricted to numbers only... 
and convert the string to number...

this is my code but it wont work.. when i trace it.. it displays.. object 
[textfield].. or 0.. or NaN..

//stores age
var userAge:Number = Number(age);
var newAge:String = String(age.text);

//age field
age.type = TextFieldType.INPUT;
age.border = true;
age.restrict = 0-9;

thanks guys..

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] hi.. need help asap.. newbie here.. hehe

2008-05-14 Thread rlyn ben
need to capture the input in textfield which is restricted to numbers only... 
and convert the string to number...

this is my code but it wont work.. when i trace it.. it displays.. object 
[textfield].. or 0.. or NaN..

//stores age
var userAge:Number = Number(age);
var newAge:String = String(age.text);

//age field
age.type = TextFieldType.INPUT;
age.border = true;
age.restrict = 0-9;

thanks guys..


  
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders