Welcome To Snipplr


Everyone's Recent ActionScript 3 Snippets Tagged number



« Prev 1 Next »
A simple utility class that will help you convert a color value (from numbers) to hexadecimal color value.
0 905 posted 10 years ago by vamapaull
Algunas veces se quiere comprobar si un numero esta entre un rango de otro número menor y otro mayor.
0 617 posted 11 years ago by fenixkim
Credit goes to Bruno Imbrizi.
0 916 posted 11 years ago by adrianparr
Credit goes to Bruno Imbrizi.
0 1188 posted 11 years ago by adrianparr
I’m sharing with you a little utility that I find myself using a lot lately. This utility is a value convertor that you can use in those times when you need to make a volume slider or something similar where you’ll need to change a value and a va...
0 991 posted 12 years ago by vamapaull
0 1455 posted 12 years ago by adrianparr
Examples of different ways to truncate/round a decimal number.
0 1020 posted 12 years ago by adrianparr
Full credit for this goes to Deva Raj (@nsdevaraj). This is also a good function for doing a similar thing, http://snipplr.com/view/27954/as3-convert-a-number-to-a-string/
2 977 posted 13 years ago by adrianparr
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
1 918 posted 13 years ago by Activetuts
This seems to be a bug.. or not.. But explains how to fix it anyway.
0 661 posted 13 years ago by godstroke
Sometimes you need to tween a number (for example from 1-100) and to get the number
1 617 posted 13 years ago by burnandbass
Format number using a comma as a separator
3 724 posted 13 years ago by Tmeister
Always need one of these on hand. Feed it a minimum number and a maximum number and it returns a random within that range. Super useful.
1 701 posted 13 years ago by IsoJon
This returns a string with a single space after the fifth character. Useful for displaying a UK mobile number which is easy to read.
0 805 posted 13 years ago by adrianparr
If the item cannot be found then the return value is NaN. This function only returns the index of the first occurence found, so it's not very good if you have multiple occurrences of the same value in the array.
0 2186 posted 14 years ago by adrianparr
// Example usage ... trace(fNumToWord(56345)); // Output ... // Fifty-Six Thousand and Three Hundred and Forty-Five
0 1147 posted 14 years ago by adrianparr
Format a number so it is more humanly readable. It allows for setting the number of decimal places (inc. adding 0000s to the end) and separating thousands with a comma. Example usage: trace(numberFormat(1234.695, 2, true, false)); // Output:...
0 1114 posted 14 years ago by adrianparr
Usage: formatDecimals(3.1415926, 3); returns: 3.141. Also adds zeros to end if needed.
0 545 posted 15 years ago by Mijos
what more can i say?! Just a small Regular expression...
1 603 posted 15 years ago by FlashJunior
« Prev 1 Next »