> -----Original Message-----
> From: Ken Ferguson [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 06, 2005 4:36 PM
> To: CF-Talk
> Subject: Actionscript equiv to decimalFormat()
> 
> Is there one? I know that all numbers in AS are floating point numbers,
> but  I'm returning a value from a function like this:
> 
> (simplified code...)
> y = Number(itemValue) * Number(quantity);
> subTotalValue.text  =  y;
> 
> When the value is something like 29, I'd like it to show as 29.00
> instead. It's very clear though, that this is not happening. My text box
> shows 29 instead.

If action script is JavaScript 1.3 or above compatible check out the
"toFix()" and "toPrecision()" methods of the Number object.  The first
should do exactly what you need.

Jim Davis





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209064
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to