Ah, ok ... thought you meant "extra" zeros after decimal ...
was a bit
unsure about that, my fault.
Well, you can't reformat a _number_ to be displayed that way,
so you would
be forced to turn it into a string.
I don't know if you ever get any number larger or equal to 1,
but that would
be something you'd need to test first, so
maybe change code to something like:
avg = Math.round(hits/ab*1000)/1000;
if (avg >= 1) {
avgText.text = avg;
} else {
var s = avg.toString();
avgText.text = s.substr(1,s.length-1);
}
this would give an output like for example
1.324
.532
.076
If you don't have numbers larger than 1 and you only want to
display the
decimals, so that the example above would be
532
76
then you could just do:
avg = Math.round(hits/ab*1000)
/Jensen/
"ndisdabest" <webforumsuser@macromedia.com> wrote in
message
news:e7tv3n$29q$1@forums.macromedia.com...
> That works pretty well... now is there any way to drop
the zero before
> the decimal point?