RE: [Flashcoders] Casting a string to a number ...

2006-05-08 Thread Scott Hyndman
or parseFloat() for floating point numbers. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Thomas Fowler Sent: Mon 5/8/2006 8:24 PM To: Flashcoders mailing list Cc: Subject:Re: [Flashcoders] Casting a string to a number ... parseInt is the preferred

Re: [Flashcoders] Casting a string to a number ...

2006-05-08 Thread Thomas Fowler
parseInt is the preferred way to get a number from a string. On 5/8/06, Ramon Miguel M. Tayag <[EMAIL PROTECTED]> wrote: You can use parseInt number = parseInt(string); -- Ramon Miguel M. Tayag Managing Director Quirkworks ___ Flashcoders@chattyfig.

Re: [Flashcoders] Casting a string to a number ...

2006-05-08 Thread Ramon Miguel M. Tayag
You can use parseInt number = parseInt(string); -- Ramon Miguel M. Tayag Managing Director Quirkworks ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashco

[Flashcoders] Casting a string to a number ...

2006-05-08 Thread Stephen Ford
A couple of times I have tried to cast a string to a number like so (this is just an example): var string:String = "9";trace(string);var number:Number = Number(string);trace(number);trace(typeof(number)); It seems to work, but is this the correct way to cast. Thanks, Stephen.___