Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignoring decimals 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi there.
I'm making a preloader for a flash movie.
I wanna display in percents (ex: 50%) how much of the flash has been loaded. So I did:

_root.percent = (_root.getBytesLoaded()/_root.getBytesTotal())*100;

And then inserted a dynamic text. The problem is:

How can I make flash do ignore the decimals in the operation above (bytesloaded/bytestotal) ?

I'm having endless decimals being displayed at the dynamic text. I want only number without decimals (ex: 1, 2, 50...)

What should I do ??

Thanks

-- Secret_Doom --
 
How about this:

x= 58.6788767;
displaypercent= int(x);

Displays 58 in my textbox!
mywink.gif
ldnewbie
 
Thanks again Oldnewbie!
It works.
Thank you very much

-- Secret_Doom --

secret_doom@hotmail.com
secretdoom.hpg.com.br - Secret_Doom's batch arquive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top