I have a problem.
I’m bulding a flash app to display photo albums. Initially, I had it setup so that you click on an album title, and it preloads and opens the first image of that album. Each click on “next image” would preload the next image, then display it. Whenever an image has loaded, it fades in by incrementing the _alpha property of the movie by 10 each time this.onFrameEnter() is called.
SO! This worked fine, but after thinkng about it for a while, I decided that I didn’t want the user experience to be hampered by having to wait for each image to be loaded every time you press “next image”. Instead, I wanted every image in the album to preload before the first image is displayed. So I wrote code that did that. Each image is loaded into a new movie clip, and the _alpha property set to 0. Then when they’re all loaded, the first image is faded in, and each click on “next image” simply fades out the image you’re on and fades in the next image.
It works OK, baring a few bugs i can weed out for myself, but i’ve noticed some strange behaviour.
Basically, for albums where there are around 10 images in total, everything works fine. However, if we go much above ten images, when they’ve loaded, the fade in is very clunky and slow, and each press on “next image” sets off the fadeout/fadein functionality ok, but it looks terrible - not smooth at all and sometimes it even messes up so bad that the image is not viewable.
I’m thinking that the amount of images that i have loaded into new movie clips is slowing down the Flash actionscript engine so that it cannot display the fadein/fadeout’s smoothly. Am i thinking correctly? If so, I’m thinking that on large albums i could load the first ten images, then when the user gets to image 6 or 7, load the next ten in and so on.
What do you think?
Is there something flawed in my logic, or is it just a case of asking too much of the Flash actionscript/display/whatever engine?
Many thanks in advance.