Nope... We flash devs have to do things the hard way. ;) There is a NumberFormat class for 2004 MX Pro, but its overkill for something so easy to do.
Kevin ----- Original Message ----- From: "Jim Davis" <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: Wednesday, June 08, 2005 9:53 PM Subject: RE: Actionscript equiv to decimalFormat() >> -----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 > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209068 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54