Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Numbers to two decimal places
From: Helen Triolo
Date: Mon, 22 May 2000 14:08:04 +0100

Kevin Newman wrote:
>
> Can any one point me in the direction of a tutorial or simply help me out
> here.
> My problem is this. I need to convert numbers into two decimal places eg.
>
> 12.3456789
>
> can I change it using action script so that it reads
>
> 12.34
>
Kevin,

int(number*100) will give you 1234 (note though that int truncates
rather than rounds), and you could output it as you want with
substring(number,1,len(number)-2) & '.' &
substring(number,len(number)-1)

hth,
Helen
----------------------------------------
helen triolo � http://i-technica.com
designerati-technica [dot] com � 301-424-6037
----------------------------------------

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
World Animation Celebration - Big Internet Animation Pow Wow Discount Offer

Register before May 25 mention flasher and save 25%!! www.wacfest.com

Be discovered, get a job or have your web series picked up. A big talent search for Shockwave
and Flash animators is happening May 30-June 4 in Hollywood. Featuring Rob Burgess, Matt
Groening, Brad Bird and more. www.wacfest.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Numbers to two decimal places, Gregg Caines

Replies
  FLASH: Numbers to two decimal places, Kevin Newman

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]