Anyone know any good resources or personal experience that help explain how much memory (and swf size) the various built-in data types take up in actionscript 3? I’m specifically interested in int, Number, and (dense) Arrays or Vectors.
I’m working on a project where I need to embed large amounts of structured array data, which is already in C++ format, so porting is just a matter of copy-paste, search-replace.
I’ve already had a look at Adobe’s lowdown on datatypes but it’s not specific enough, and doesn’t mention Arrays, etc.
Check out this mobile development whitepaper for AS3. It’s labelled as a “mobile” development spec, but the principles in here work for any Flash project.
http://help.adobe.com/en_US/as3/mobile/index.html
You can also experiment with the flash.sampler.getSize() method. A direct link to what you’re looking at is here:
http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c3-576ba64d124318d7189-7fff.html
http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c3a0f5f19124318fc87b-7fff.html