dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: formating output

  1. #1
    Member
    Join Date
    Mar 2001
    Location
    Lisbon, Portugal
    Posts
    64

    Smile

    hi all, this is my first post.
    I have a litle problem, im working in a preloader with lots of information and i would like to format my output box of bit rate Kb/s.
    My current out put its something like Ex.: 15 Kb/s
    and i wanted like 15.21 Kb/s
    is there anyway i could do it?

    bit_rateKbs = int(bps/1024) add " Kb/s";

    thanx all

  2. #2
    Member
    Join Date
    Oct 2001
    Posts
    44

    Red face

    Check this out:

    Code:
    bit_rate = bps/1024; 
    temp=String(bit_rate);
    // +3 means two digits after 0
    bit_rateKbs=temp.substr(0,temp.indexOf(".")+3) add " Kb/s";
    ZeroIQ

  3. #3
    Member
    Join Date
    Mar 2001
    Location
    Lisbon, Portugal
    Posts
    64

    Smile

    thanx, it really works
    when finished im gonna post the preloader
    thanx again by the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center