开发者

Actionscript embedded assets maximum size

开发者 https://www.devze.com 2023-02-09 01:38 出处:网络
I have some actionscript code that someone gave me and some instructions on how to compile it using FlashDevelop in Windows. The code embeds a lot of sounds into the application with commands like:

I have some actionscript code that someone gave me and some instructions on how to compile it using FlashDevelop in Windows. The code embeds a lot of sounds into the application with commands like:

<asset path="assets\level-1\sound-0.mp3" />

It compiles fine with the supplied mp3s. I can replace the mp3 with mp3s of similar size (with the same names) and it still compiles fine. If I replace the mp3 with a larger file size (less compression), the compiling fails with the following error:

Fatal error: exception Invalid_argument("String.create")

Build halted with errors (mtasc).

The failure seems to happen when the total size of the assets gets above 10 MB. Does actionscript have a memory limit on em开发者_开发技巧bedded assets? Can this be raised some place in FlashDevelop?


looks like you're using mxml, so I don't have much experience there. I usually use the [Embed(source='../myimage.png')] syntax in as code. Though I haven't seen it cause errors I haven't tried files as big as 10MB

These are compile-time inclusions, so you could also put the mp3s in a swc file and reference them from there, but it is an extra step, and if you update the asset files frequently, it could get annoying pretty quickly.

0

精彩评论

暂无评论...
验证码 换一张
取 消