Do uints take different amounts of memory depending on their value? Or does each uint take the same amount of memory regardless of it's value?
They're always 32 bits: http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/uint.html
uint
is 32-bit data type.
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/uint.html
uint is 32 bit unsigned integer.
But surprisingly int datatype is faster than uints in ActionScript 3.
Ref:
uints slow
Avoid ints in actionscript.
uints are always 32-bit.
If you're looking to save memory, you could use a ByteArray which allows you to store a byte (8 bits), a ushort (16 bits), an int (32 bits), or a double (64 bits). Don't trust its Boolean method as it uses an entire byte to store one bit. It's not difficult, however, to write a bit flag method to store up to eight booleans in one byte.
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/utils/ByteArray.html
uint used to be slower than int in Flash 9. But in Flash 10, it's faster.