Gordon, Thank you for bringing the list back to a more coding oriented tone.
-TH --- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > If you just need rounding to a fixed number of decimal places, and you > don't need formatting, you could use the toFixed() method of the Number > class. ASDoc example: > > > var num:Number = 7.31343; > trace(num.toFixed(3)); // Output: 7.313 > > - Gordon > > > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Darin Kohles > Sent: Thursday, August 24, 2006 10:35 AM > To: [email protected] > Subject: [flexcoders] Re: Limiting decimal places > > > > Use a Currency Formatter: > > // import the class > import mx.formatters.CurrencyFormatter; > > // in code create and instance and set the format (also include $|,|. > selection) > var cashFormatter:CurrencyFormatter = new CurrencyFormatter(); > cashFormatter.precision=2; > > // apply the format to the raw and save > productPrice.text = cashFormatter.format(productObj.retailprice); > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

