-
Okay, this is the first time I'm using getBytesLoaded and getBytesTotal in actionscripting, and I pulled them off successfully. I'm just have a little bit of a problem with the formatting:
#1 - How do I get rid of the decimals? I just want to give my visitors an approximate 45k of 70K thing rather than a 45.023K of 70K thing.
#2 - This may sound like a stupid question - but how many bytes is there in a kilobyte? Do I dived getbyteloaded by 1000 or by 1024? Just making sure that's all!
Thanks in advance!
-
int() works.
You divide by 1024, so...
int(getBytesLoaded()/1024);
should give you the effect you're looking for.
-
divide by 1024
and the decimals you round it using
Math.round ()
example
totalKB = Math.round(totalKB);
uberflash
-
Thanks a lot! :)
THanks a lot guys!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|