AS3: Notes on Non-Alchemy Fast Memory Access

To be honest, my recent project has been getting more and more boring. The core stuff is basically done, and almost everything left is grunt work — nothing new or fun. Yesterday I finished The Settlers 7, was just about to drift off to sleep, and then suddenly came across two pages that perked me right up: [http://www.buraks.com/azoth/](http://www.buraks.com/azoth/) and [http://philippe.elsass.me/2010/05/as3-fast-memory-access-without-alchemy/](http://philippe.elsass.me/2010/05/as3-fast-memory-access-without-alchemy/) . Suddenly I was wide awake. When it comes to handling certain crazy requirements, the speed of reading from and writing to a ByteArray in FlashPlayer just can't keep up. These past couple of days [Xu Can](http://www.asblog.org/) got pushed into having to hunt for some heretical, unofficial hack — and he actually found one. I'd heard before that haXe is so efficient because its author found the low-level interface FlashPlayer 10 provides for Alchemy, but for various reasons I never went and used haXe. Seeing these two pages showed me yet another trick — turns out they're all wares from the same circle. All three of them found the “back door” FlashPlayer 10 opened for Alchemy in order to boost performance at a low level.

Flash

Fixing the error when Flash reads a ByteArray from amfphp

Who will save me? Error reading ByteArray from amfphp in Flash Related search phrases: Sending a ByteArray from AMFPHP to Flash fails / AMF can’t send a ByteArray to AS3 / ByteArray can’t be remoted to Flash TypeError: Error #1034: Type Coercion failed: cannot convert Object@******* to flash.utils.ByteArray. / TypeError: Error #1034: 强制转换类型失败:无法将 Object@*******转换为 flash.utils.ByteArray It happens with AS3 Flash remoting, not with Flex remoting.

Flash