嵌套在 AS3 .swf 容器中时,AS2 .swf loadmovie() 和 unloadmovie() 失败 [英] AS2 .swf loadmovie() and unloadmovie() fail when nested inside an AS3 .swf container

查看:23
本文介绍了嵌套在 AS3 .swf 容器中时,AS2 .swf loadmovie() 和 unloadmovie() 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 AS2 .swf 作为父 AS3 .swf 的子项加载.AS2.swf 调用 loadmovie() 和 unloadmovie() 来显示 3 个 jpeg 文件.图像第一次加载,但之后,调用 loadmovie() 来替换图像,或者调用 unloadmovie() 失败.我发现了以下 Adob​​e 错误报告(https://bugs.adobe.com/jira/browse/ASC-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel) 说了这个已经解决,还说可以更换子影片剪辑没有问题.这是我正在调用的代码.

I have an AS2 .swf being loaded as a child of a parent AS3 .swf. The AS2.swf calls loadmovie() and unloadmovie() to display 3 jpeg files. The images load the first time, but after that, a call to loadmovie() to replace the image, or a call to unloadmovie() fail. I found the following Adobe Bug report (https://bugs.adobe.com/jira/browse/ASC-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel) that has said this has been resolved, and also said that child movieclips could be replaced without a problem. Here is the code I'm calling.

_root.help_mc.scenes_image1_mc.loadMovie("first.jpg");
_root.help_mc.scenes_image2_mc.loadMovie("second.jpg");
_root.help_mc.scenes_image3_mc.loadMovie("third.jpg");

_root.help_mc.scenes_image1_mc.unloadMovie();
_root.help_mc.scenes_image2_mc.unloadMovie();
_root.help_mc.scenes_image3_mc.unloadMovie();

我不精通 ActionScript,所以恐怕我没有以正确的方式引用影片剪辑.错误报告说子swf不能代替他们自己,但是如果AS2 swf充当伪根,我可以通过AS2 swf引用影片剪辑吗?

I'm not well versed in ActionScript, so I'm afraid I might not be referencing the movieclip in the correct way. The bug report said child swf's cannot replace themseleves, but if the AS2 swf is acting as the psuedo root, can I reference the movieclip through the AS2 swf?

推荐答案

AS2 不能与 AS3 一起使用.Flash Player 9 及更高版本有两个不同的虚拟机 - 一个用于 AS1、AS2,另一个用于 AS3,并且一次只加载其中一个,这意味着您可以执行 AS3 或 AS2,但不能同时执行两者.

AS2 doesn't work along-side AS3. Flash Player 9 and above have two different virtual machines - one for AS1, AS2 and the other for AS3 and only one of them is loaded at once, meaning that you can execute either AS3 or AS2 but not both.

http://en.wikipedia.org/wiki/ActionScript#Timeline_by_ActionScript_version

这篇关于嵌套在 AS3 .swf 容器中时,AS2 .swf loadmovie() 和 unloadmovie() 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆