Tag Archive for 'datatipformatfunction'

25
Jul

Formatting colors as strings with ActionScript

Here’s a pretty weak tip, but maybe somebody out there will find it useful. Often when working with colors, you need to format the text before displaying it, otherwise blue may display as “ff” and black as “0″. Here’s a semi-handy tip for making sure numbers display as hex values with at least six characters (and all uppercase, no less).

Continue reading ‘Formatting colors as strings with ActionScript’

18
Jul

Formatting data tips in a Slider

I was playing around with the HSlider the other day and needed to format the data tool tip. Thankfully, the Flex SDK makes it very very easy, all you need to do to override the default data tip using the dataTipFormatFunction property. By simply passing in the name of a user-defined function, you can format the data tip text however you want (such as prefixing dollar signs or what have you).

Full code after the jump.

Continue reading ‘Formatting data tips in a Slider’