Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Make number to 2 decimal places.. HELP! |
From: | Helen Triolo |
Date: | Mon, 11 Sep 2000 18:38:44 +0100 |
And here's some exact code that should work (for Flash 4):
Set Variable: "num" = int(x*100+0.5) // to round to the nearest
hundredth
If (num < 10)
Set Variable: "formatted" = "0.0" & num
Else If (num < 100)
Set Variable: "formatted" = "0." & num
Else
Set Variable: "formatted" = substring(num, 1, length(num)-2) & "." &
substring(num, length(num)-1)
End If
frank pichel wrote:
>
> Chris
>
> Use the substring expression - it puts a substring out of a string of
> characters.
>
> Substring ( string, index, count )
>
> in it:
> string is equal to a variable name
> index is the character you want to use (over from the left, I believe)
> count is the number of characters you want to extract
>
> for your example
>
> Set Variable: "little_number" = Substring (big_number, 3, 2 )
>
> so you will output little_number now instead of big_number
>
> frank
>
> > Hi guys.
> >
> > Just joined this list, so be gentle.
> >
> > Basicaly im using Flash 4 for a couple of loan company clients. By using
> the
> > FS commands i can make flash do some pretty cool equations that would make
> > any math nerd drool lol.
> >
> > However I'm having the problem that because of the equation it leaves
> allot
> > of digits after the decimal point.
> > I.e
> > Output = 12.455555555
> >
> > If I could get that figure to two decimal points, I would be VERY happy as
> > it would make the whole thing far more polished looking.
> >
> > Any help/ ideas you can give would be fantastic.
> >
> > Thanks
> > Chris Mc
> > chrismcbip-ltd [dot] co [dot] uk
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> NudeGuru.com is proud to sponsor the Flasher list
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> IT'S THE ART OF MONEY, HONEY!
> Tips and Advice from some of the most popular Flash
> artists + industry power-brokers on how to hold onto
> your rights, negotiate contracts and get full value
> for your work.http://www.nudeguru.com from Franke James
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpchinwag [dot] com
--
------------------------------------------------------------------
Flash 5 Journal: http://i-technica.com/flash5 (9/3: skincolor app)
Flash Q&A archive: http://i-technica.com/flashlist
Helen Triolo � http://i-Technica.com � 301-424-6037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Make number to 2 decimal places.., chrismc
Replies
Re: FLASH: Free Flash FAQ needs your con, Helen Triolo
RE: FLASH: Free Flash FAQ needs your con, Gabriel Mulzer
FLASH: Make number to 2 decimal places.., ChrisMc
Re: FLASH: Make number to 2 decimal plac, frank pichel
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]