将 AS2 swf 加载到 AS3 swf 时出现问题

发布于 2024-08-29 18:55:58 字数 332 浏览 4 评论 0原文

我一直在努力让 AS2 swf 在 AS3 swf 中正确加载 - 但无济于事...

AS2 文件(这是一个引用许多外部 xml 文件等的相当大的应用程序)在启动时完美运行闪存播放器。

当尝试通过 AS3 swf(使用 URLRequest 和 Loader 类)加载同一文件时,文件开始加载,但在预加载阶段突然停止。 (如果我尝试使用 AS2“loadMovie”加载它,也会发生同样的情况。)

更新:看起来 swf 实际上是通过 AS2 loadMovie 而不是 AS3 Loader 类加载的。

还有什么可以尝试的?安全设置、自定义加载器类 - 如有任何建议,我们将不胜感激。

I've been trying very hard to get an AS2 swf to load properly inside an AS3 swf - but to no avail ...

The AS2 file (which is a rather big app referencing many external xml files etc.) works perfectly when launched in Flash Player.

When trying to load the same file through an AS3 swf (using URLRequest and Loader classes), the file starts loading but stops abruptly during the preloading phase. (Same happens if I try to load it using AS2 "loadMovie".)

Update: It seems as if the swf actually loads through AS2 loadMovie but not AS3 Loader class.

What is there more to try? Security settings, custom loader classes - any advice is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

高跟鞋的旋律 2024-09-05 18:55:58

另请记住,加载到 AS3 swf 中的 AS2 swf 在与其父 swf 通信时会出现问题,因此加载器将无法跟踪 swf 的加载 - 因此这可能会给您带来问题。您应该构建在 AS2 中加载的 swf,然后使用 LocalConnection 将其连接到 AS3 swf。

Also keep in mind that an AS2 swf loaded into an AS3 swf will have problems communicating to it's parent swf, so the Loader will have trouble keeping track of the loading of the swf - so that might cause you a problem. You should build the swf that DOES the loading in AS2 and then connect it to an AS3 swf using LocalConnection.

往日 2024-09-05 18:55:58

一般来说,您加载的电影必须设计为从其他 swf 加载。例如,任何初始化代码都必须放置在 Event.ADDED_TO_STAGE 事件发生之后,并且对根的每个引用都不会按您的预期工作。例如,元素的根是 swf 单独运行时的阶段,但是当 swf 从另一个 swf 加载时,根是父 swf,其大小和位置可能不同,会给您带来一些麻烦。

In general your loaded movie have to be designed to be loaded from an other swf. For example any initialization code must be places after the Event.ADDED_TO_STAGE event occurs and every references to the root don't work as you expect. For example the root for an element it's the stage when the swf runs alone but when the swf it's loaded from another swf the root it's the parent swf that can be different in size and position causing you some trouble.

始终不够爱げ你 2024-09-05 18:55:58

在您的 AS2 代码中,请务必将 lockroot (或者是 _lockroot?) 设置为 true。另外,如果您在 AS2 代码中的任何地方使用 _level0,它将不起作用,您需要将其更改为 _root。

In your AS2 code, be sure to set lockroot (or was it _lockroot?) to true. Also if you use _level0 in your AS2 code anywhere, it will not work, you need to change that to _root.

小霸王臭丫头 2024-09-05 18:55:58

检查这个。

  1. 在frame2中创建一个AS2容器来加载您的AS2 APP;
  2. 将容器加载到 AS3 动画。
  3. 通过 LocalConnection 进行这些通信。

将所有 AS2 APP 类导出到框架 2(在发布设置中)。

check this one.

  1. make an AS2 container to load your AS2 APP, in frame2;
  2. load container to AS3 animation.
  3. make these communications via LocalConnection.

or

export all your AS2 APP classes to frame 2 (in publish setting).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文