Hi , i creating an application with movie animation , i have a animation some group of insects fly around a lamp ,
so i render my animation as png images [they are about 400 png image frames] and when i want play insects movie on my app ... it seems the iphone running out of memory (i try short animation and works fine) but long animation not ! .
what's your suggestion to play this animation on iphone sdk , i don't know the MPMovieController
is a good idea ! because my animation doesn't any background .
views:
48answers:
1
A:
Best way is to create normal movie file and play it with standard controller.
If it's unacceptable, you can do something like this. Two threads, one thread loads images from disk, another one shows them per 1/15 (1/30, whatever) of a second. There are several difficulties:
- iPhone flash storage speed. It's very limited. So you can do something like 128x128 animation with ease, and fail to do so with full-screen one.
- Such flash using drains battery very fast.
Maybe, you can also store some part of your animation in memory (every second frame for example) so you'll have to load less from flash.
Alexander Babaev
2010-04-05 11:16:46