Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-17-2002, 12:00 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default [quote]totalSize.format("%.0f"));

Edward says:

Quote:
Hi, looks to be a nice app so far, but I tested out the totalsize and availablespace objects, but I would like the result to be reported in Mb. The "%.0f" should do this, right? But I cant seam to get it right.

Reply With Quote
  #2 (permalink)  
Old 12-17-2002, 12:00 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]totalSize.format("%.0f"));

Code:
s = ((totalSize)/(1000*1000)).format("%.0f");
trace(s);
Reply With Quote
  #3 (permalink)  
Old 12-17-2002, 12:01 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]totalSize.format("%.0f"));

Edward says:
Quote:

This is the code I try:
Code:

var d = Drive.drives;
var show = "";
for (i = 0; i < d.length; i++)
{
show += trace(d.driveLetter, ":", d.driveType) + "\n";
show += trace("\t", d.fileSystem) + "\n";
show += trace("\t", d.isReady) + "\n";
show += trace("\t", d.rootFolder) + "\n";
show += trace("\t", d.serialNumber) + "\n";
show += trace("\t", d.availableSpace.format("%.0f")) + "\n";
show += trace(("\t", d.totalSize)/(1000*1000)).format("%.0f") + "\n";
show += trace("\t", d.volumeName) + "\n";
}
FlashPlayer.bindData("space");
FlashPlayer.space = show;
FlashPlayer.updateData(false);
"space" being the variable name for the text field in MX.
Reply With Quote
  #4 (permalink)  
Old 12-17-2002, 12:02 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]totalSize.format("%.0f"));

"trace" prints output to the trace window and returns nothing.

"totalSize/1024/1024" is enough
Reply With Quote
  #5 (permalink)  
Old 12-17-2002, 12:03 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]totalSize.format("%.0f"));

Edward says:

Quote:

Ok, thanks now it worked with this code:
Code:

d = new Drive("c:\\");
var show = "";
show = (d.totalSize/1024/1024).format("%.0f");

FlashPlayer.bindData("space");
FlashPlayer.space = show;
FlashPlayer.updateData(false);
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:03 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.