I have been working on a flash game where I add sub-animations to a movieclip by attaching child movieclips. This creates a hierarchy of movie clips with different animations, but the result of that was that the parent movieclip ended up growing indefinitely and eating lots of memory. Is there a way I can optimize such animation? If bitmap caching works, would I be able to cache all the children which were added before runtime (e.g children movieclips which were added during design and before publishing the SWF).
PS I’m working with Flash Air 2.6 if that’s of any help.
I have been working on a flash game where I add sub-animations to a
Share
Well, you’re giving the answer yourself, Flash can do a lot but doesn’t have unlimited amount of memory. However well designed your animation is, if the parent movie clip is “growing indefinitely” there will of course be a point where all will crash.
With the information given, I can only give you a general answer.
It is impossible to add an indefinite amount of children, but you can certainly give that impression if you keep removing the children that get out of scope.
Is there any way you can improve your design by avoiding repeats?
Do you work in the Flash IDE or do you use another IDE such as FlashBuilder, the latter has profiling tools that would allow you to check your application memory usage.