USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 6/9/09 04:15 PM
Sign-Up: 06/08/09
Posts: 12
when i make a preloader the outcome is for example
LOADING: 41.5674657984365879376523%
how do i get rid of the decimal places?
As you can probably see, I'm not too shy about flaunting my nationality. LONG LIVE TEHDE SHITE!
Posted at: 6/9/09 04:16 PM
Sign-Up: 08/10/05
Posts: 6,031
Math.round(#);
Portfolio(Under construction): UnknownFury.com | Msn: giant_ak_47@msn.com | Contact: me@unknownfury.com Follow me on twitter!
Posted at: 6/9/09 04:33 PM
in what context is that?
Posted at: 6/9/09 04:37 PM
Sign-Up: 04/22/05
Posts: 9,692
The number you want to round goes inside the brackets and the whole thing returns the rounded number...
Posted at: 6/9/09 04:44 PM
Sign-Up: 06/11/06
Posts: 1,657
Well let's see your loading script.
Posted at: 6/9/09 06:17 PM
Sign-Up: 03/02/02
Posts: 13,466
At 6/9/09 04:16 PM, UnknownFury wrote: Math.round(#);
You'd probably want to use Math.floor(num);
if the loading percent is 99.55, that will be rounded to 100 and will imply that the movie is fully loaded when it is not
Posted at: 6/9/09 11:49 PM
Sign-Up: 10/05/08
Posts: 1,425
perLoaded = Math.floor(perLoaded)
AS2||AS3||Motox Thanks to hdxmike for the sig :]
Posted at: 6/9/09 11:51 PM
Sign-Up: 05/29/04
Posts: 13,825
Math.ceiling will always round up, in case you were wondering.
FORUM MODERATOR PM Forum Abuse to: Me :: AIM: gumOnShoeNG Improve Your Responses >:(
Posted at: 6/10/09 12:03 AM
Sign-Up: 06/23/03
Posts: 1,055
At 6/9/09 11:51 PM, gumOnShoe wrote: Math.ceiling will always round up, in case you were wondering.
Math.ceil(Number); will always round up.
Actionscript rolls like that.
|- I'm on a Boat - Collab -|- List -|- AS3 -|- Game Poll -|
All times are Eastern Standard Time (GMT -5) | Current Time: 08:08 PM
<< Back