作者:mobiledu2502912277 | 来源:互联网 | 2023-05-18 00:53
IvegoneovertheAlchemyquickstartguideandexportedmystringecho.swcsuccessfully,butIdon
I've gone over the Alchemy quick start guide and exported my stringecho.swc
successfully, but I don't want to compile in Flex. I just don't know Flex and I'm not very keen on learning it all of a sudden. I tried to do my business in Flash, instead, considering that they both run on AS3. The Flex code they give as an example is
我已经浏览了Alchemy快速入门指南并成功导出了我的stringecho.swc,但我不想在Flex中编译。我只是不知道Flex而且我不是很热衷于突然学习它。我尝试在Flash中开展业务,相反,他们都在AS3上运行。他们给出的Flex代码是一个例子
package
{
import flash.display.Sprite;
import cmodule.stringecho.CLibInit;
public class EchoTest extends Sprite
{
public function EchoTest()
{
var loader:CLibInit = new CLibInit;
var lib:Object = loader.init();
trace(lib.echo("foo"));
}
}
}
I've added my swc in the Flash CS4 options and thought I could convert the Flex code into the following AS3 Flash code, written in the timeline:
我已经在Flash CS4选项中添加了我的swc,并认为我可以将Flex代码转换为以下AS3 Flash代码,在时间轴中编写:
import cmodule.stringecho.CLibInit;
var loader:CLibInit = new CLibInit;
var lib:Object = loader.init();
trace(lib.echo("foo"));
But, alas, I get the following error at runtime: ReferenceError: Error #1065: Variable MainTimeline is not defined.
但是,唉,我在运行时遇到以下错误:ReferenceError:错误#1065:未定义变量MainTimeline。
I've not enough experience with Flex, but quite a lot with Flash, but that error tells me nothing at all. I haven't heard of any properties of the stage object or whatever called MainTimeline. Could someone tell me why I get the error or why what I'm doing is just plain stupid?
我没有足够的使用Flex的经验,但使用Flash的经验相当多,但这个错误根本没有告诉我任何事情。我没有听说过舞台对象的任何属性或任何名为MainTimeline的属性。有人能告诉我为什么我得到错误或为什么我正在做的只是简单的愚蠢?
1 个解决方案