开发者

How to reduce memory usages while loading sprite sequences of images in AS3

I've made a *.swf file of the sprite sequences of 1000 images with (780 x 480) size. After that I embed this with another one class to show but every time it crushes during run time because of insufficient memory (assume that I have 2GB memory space). Which is the best way to implem开发者_开发知识库ent such big sprite sequences in AS3 by avoiding the memory problem? Please help if you have any good suggestions.. Thanks a lot.


You are probably trying to load them all at a time in memory. That is a huge amount of memory. You really don't need 1000 images at a time. May be you can load 10 - 20 at once and while running the sequence remove the previous onces from memory. In this way you can reduce the memory footprint.

And are you embedding 1000 images in the main swf? What is the size of the swf in that case? That will be huge and user have to wait too long to load. Instead of embedding in main swf, dynamically loading the images might be a better approach.


Embad, and how will user download that huge swf? If you're targeting flash (not AIR) I think it'll be better to store images on server, and download them by request. If you're targeting AIR, do as Marty propses: devide swf into smaller swfs.


Why don't you simply made a video of your images ?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜