简体   繁体   English

将 swf 加载到另一个 swf - 子 swf 阶段问题

[英]Loading swf into another swf - child swf stage problems

So Im loading movie B into movie A - using Loader class. All works well.所以我将电影 B 加载到电影 A - 使用加载器 class。一切正常。 But on one of the clients machine the child swf is not added to the display list.但在其中一台客户端机器上,子 swf 未添加到显示列表中。 Instead he gets five running dots on screen.相反,他在屏幕上看到了五个连续的点。 He sees preloader, but when its done loading the application crashes with those dots running.他看到了预加载器,但当它完成加载时,应用程序崩溃并运行这些点。 I guess somehow it tried to add the child swf to stage before stage was available, although I added correct script to check for the stage in child swf我猜它试图在舞台可用之前以某种方式将子 swf 添加到舞台,尽管我添加了正确的脚本来检查子 swf 中的舞台

In child swf constructor:在子 swf 构造函数中:

if (stage) {
    init();
}else {
    addEventListener(Event.ADDED_TO_STAGE, init);
}

private function init(e:Event = null):void 
{
    removeEventListener(Event.ADDED_TO_STAGE, init);
    //...... the rest
}

I suspect that clients machine is slow and that could be possible cause to this.我怀疑客户端机器速度很慢,这可能是造成这种情况的原因。在此处输入图像描述

Everywhere else it works as expected - both mac and pc.它在其他任何地方都按预期工作 - mac 和 pc。

Any thoughts, thanks.任何想法,谢谢。

First thing as you said it works well on several machines including your (mac), I would think it could either be a browser problem as your client may have a different browser, or flash Version.正如您所说的第一件事,它在包括您的(mac)在内的多台机器上运行良好,我认为这可能是浏览器问题,因为您的客户端可能有不同的浏览器,或者 flash 版本。

From the information you provided me i suggest you follow up on the platform your clients running it on, for instance Windows XP, Vista or 7. Cross check with your browser, Explorer, Fire Fox or Chrome, just to name the most common.根据您提供给我的信息,我建议您跟进您的客户运行它的平台,例如 Windows XP、Vista 或 7。交叉检查您的浏览器、Explorer、Fire Fox 或 Chrome,仅举出最常见的名称。 Also how the Flash file is embedded into HTML or not, This may have effect on different browsers还有 Flash 文件是如何嵌入到 HTML 中的,这可能对不同的浏览器有影响

Check your Clients Flash version, they may simply just need to update it.could be corrupt Also in your question you should just type the link your SWF is located then we all can just check it and see how common this error is.检查您的客户端 Flash 版本,他们可能只需要更新它。可能已损坏此外,在您的问题中,您应该只输入您的 SWF 所在的链接,然后我们都可以检查它,看看这个错误有多普遍。

Last thing to note it may be your code but you havent posted your loader class for either the community or i to see.最后要注意的是,它可能是您的代码,但您还没有发布您的加载程序 class 供社区或我查看。 its all speculation let us no how you go.所有的猜测都让我们不知道你 go。

I've seen this happen when the movie clip loaded is compiled for a newer version of flash than the client has.当加载的影片剪辑编译为比客户端更新的 flash 版本时,我已经看到这种情况发生。 Check the flash version of the player and the SWFs to be sure that's not the case.检查 flash 版本的播放器和 SWF 以确保不是这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM