views:

127

answers:

2

I've got a flash project that due to requirements has to be backward compatible with flash 6. Everything works, except the first 6 (of 17) jpeg images that are loaded by <MovieClip>.loadMovie don't respond to changes to their alpha setting.

If I rearrange the order of the images in the XML file that is used to provide the image urls to the flash movie, the new first six images fail to respond to alpha and the old six will respond to alpha.

Any ideas as to what might be the cause?

Edit: I had added code to try and wait for the images to load completely first using onClipEvent(data). The images appear to pre-load before the animation starts but the alpha property still doesn't work.

Edit 2: I justed used a wipe type transition instead of a fade. I hope to never have to use flash 6 again.

A: 

Are you waiting for all the images to load properly before you change their alpha? You need to listen for the INIT event (not sure of the exact name in as2) for them to be available to your code.

grapefrukt
A: 

Use loadClip instead of loadMovie and make sure you listen to "onLoadInit":

var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();

mcLoader.addListener(this);
mcLoader.loadClip("YourImage.jpg", container);


function onLoadInit(mc:MovieClip) {
trace("onLoadInit: " + mc);

}

euge1979
Unfortunately, MovieClipLoader isn't available until Flash 7.
Stephen Caldwell
You're right, you'll have to use loadMovie.
euge1979