Reputation: 221
working on making a flash program that loads about 1000 jpegs and then plays them like a movie. Have all the buttons and stuff working but the time it takes for an image to load is so high that the movie can't be played at 30 fps. I've tried multiple ways of fixing this
using 1 scrollpane and changing its source ever 30 ms. This one is the worst but simplest. Flickers cause strobing and it is unwatchable.
used 2 scrollpanes that were duplicates of each other until I had to load. I would then make that one invisible, load it , then make it visible. Then load the background one. Works but same problem as the first at high speeds, just less severe.
used 1 scrollpane per image . This works great, except that it fails miserably on any more than 100 of them due to the number of objects. DON'T TRY THIS FOR LARGE SETS OF IMAGES
Has anyone else experienced/solved/wants to help me solve this? None of my fixes have worked.
Currently using action script 3, but will change if its not possible in that.
Also, I want to be able to zoom in and then scroll around the window hence the scrollpanes, but if that's not possible its a sacrifice I'm willing to make
Upvotes: 0
Views: 428
Reputation: 53850
2 is on the right track. Normally this is done using double buffering (#2), but it seems flash is too slow for that.
You might need to use triple buffering or quad buffering. You have n buffers in a cirular queue, you issue loads on all of them, then display at 30fps. When the i'th frame has been displayed, you add the i+n image to the queue, and issue a background load.
Upvotes: 2