问题描述
所以我在actionscript 2中有很多类。但是我需要修改我的应用程序以使用soundchannel对象进行音频监视。据我所知这只是在ActionScript 3.所以它有可能在AS3中写一个类,其余的在AS2?如果不是有一个转换,工具,它可以使这个过程更容易吗?
ActionScriptBridge网站使用的语言是有点误导:使用Flash AS2.0 AS3.0项目中的闪存组件。然后告诉你它是如何工作的:技术上来说:使用ASB在Adobe Flash AS3.0项目中加载Macromedia / Adobe Flash AS2.0项目(swf)并在它们之间进行通信。。
你必须在ActionScriptBridge的情况下编译两个独立的swf。一个用于AVM1字节码(as2),一个用于AVM2(as3)。您也可以使用LocalConnection在两个不同AVM的swf之间进行通信。没有办法编译2& 3)(除非你写了你自己的编译器;))
下面是一个关于Senocular的解释LocalConnection和AVM的好帖子:。这里的关键是
so I have a lot of classes in actionscript 2. But I need to modify my application to use the soundchannel object for audio monitoring. as far as i know this is only in actionscript 3. so it it possible to write one class in AS3 and leave the rest in AS2?
if not is there a conversion tool which can make the process easier?
The language the ActionScriptBridge site uses is sort of misleading: "Use flash AS2.0 flash components in AS3.0 projects." And then tells you how it works: "Technically: Load Macromedia/Adobe Flash AS2.0 projects (swf) inside Adobe Flash AS3.0 projects using ASB and communicate between them.".
You'd have to compile two separate swfs in the ActionScriptBridge case. One for AVM1 bytecode (as2) and one for AVM2 (as3). You can also use LocalConnection to communicate between two swfs that are different AVMs. There is no way to compile 2 & 3 together (unless maybe you wrote your own compiler ;))
Here's a nice post on Senocular explaining the LocalConnection and the AVM: http://www.kirupa.com/forum/showthread.php?p=1964550. The key here being
这篇关于动作2到动作3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!