As3: Show a number wiht a fixed number of digits after the decimal point


/ Published in: ActionScript 3
Save to your folder(s)

know how to show a number with a fixed number of digits after the decimal point.


Copy this code and paste it in your HTML
  1. var num:Number = 12.3456;
  2. trace(num.toFixed(2));// => 12.34

URL: http://flash.sikotiko.com/2009/04/23/as3-number-methods/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.