The exact output I get from the sample code is: "Today's price is $0.25."
There must be something else going on if you are getting different results, like no leading 0. My configuration is: Windows XP Pro Flex 1.5 Build 87315.134646 Developer Edition Tomcat 5.0.19 standalone server --- In [email protected], Andriy Panas <[EMAIL PROTECTED]> wrote: > > Hello , flexcoders > > I was stumbled upon that all my fractional numbers like 0.25, 0.45, > 0.65, etc are displayed after formatting with <mx:CurrencyFormatter> > like this: > > $.25, $.45, $.65 > > What I want my numbers to be displayed is: > > $0.25, $0.45, $.65. > > I cannot find a simple and reliable way to specify the MUST inclusion > of 0 number when using standard <mx:CurrencyFormatter>. Playing with > currencySymbol="$0" attribute is not a reliable solution, IMHO. > > Should I resort to writing my own formatter? > > > -----START of sample code copied from Flex 1.5 help section (http://tinyurl.com/jyckh) -- > > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"> > <!-- Declare a CurrencyFormatter and define parameters. --> > <mx:CurrencyFormatter id="Price" precision="2" > rounding="none" > decimalSeparatorTo="." > thousandsSeparatorTo="," > useThousandsSeparator="true" > useNegativeSign="true" > currencySymbol="$0" > alignSymbol="left" /> > <mx:Script> > <![CDATA[ > var todaysPrice=0.25; > ]]> > </mx:Script> > > <!-- Trigger the formatter while populating a string with data. --> > <mx:TextInput text="Today's price is {Price.format (todaysPrice)}." /> > > </mx:Application> > > ---END of sample code copied from Flex 1.5 help section ----------- ------- > > -- > Best regards, > Andriy mailto:[EMAIL PROTECTED] > ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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/

