Groups | Blog | Home
all groups > flash (macromedia) > june 2006 >

flash (macromedia) : Round


-->dan mode
6/12/2006 5:10:25 PM
Press F1. Look at the Math class.


--


Dan Mode
*THE online Radio* http://www.tornadostream.com
*Must Read* http://www.smithmediafusion.com/blog
*Flash Helps* http://www.smithmediafusion.com/blog/?cat=11

[quoted text, click to view]

Balloony2
6/12/2006 8:37:50 PM
Can anyone give me a basic method to round a number to the nearest 1.
e.g: if(number = 134.87896) number = 134

Nickels55
6/12/2006 8:50:56 PM
Math.round( x );

Balloony2
6/13/2006 9:03:32 PM
Thanks for that , tried Round , but didn't put the Math in front...lol

Nickels55
6/13/2006 9:11:39 PM
Description:
Method; rounds the value of the parameter x up or down to the nearest integer
and returns the value.

I think you have to write your own function to round the number to the nearest
100, 1000, etc....
AddThis Social Bookmark Button