Flash Player 6中的非工作alpha [Give Up On]

时间:2022-12-29 21:17:35

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.

我有一个闪存项目,由于要求必须向后兼容闪存6.一切正常,除了由 加载的前6个(17个)jpeg图像.loadMovie不响应他们的更改alpha设置。

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.

如果我重新排列用于向flash电影提供图像URL的XML文件中的图像顺序,则新的前六个图像无法响应alpha,而旧六个将响应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.

编辑:我添加了代码尝试等待图像首先使用onClipEvent(数据)完全加载。图像似乎在动画开始之前预加载但alpha属性仍然不起作用。

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

编辑2:我justed使用了擦除类型转换而不是淡入淡出。我希望永远不必再使用闪光灯6。

2 个解决方案

#1


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.

在更改alpha之前,您是否在等待所有图像正确加载?您需要侦听INIT事件(不确定as2中的确切名称),以便它们可用于您的代码。

#2


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

使用loadClip而不是loadMovie并确保您收听“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);

}

#1


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.

在更改alpha之前,您是否在等待所有图像正确加载?您需要侦听INIT事件(不确定as2中的确切名称),以便它们可用于您的代码。

#2


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

使用loadClip而不是loadMovie并确保您收听“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);

}