【发布时间】:2011-09-11 20:34:23
【问题描述】:
抱歉 - 我知道这之前已经介绍过,但我无法让我的 flash 文件找到并使用我的文档类。这是我的设置(从根目录)
我有一个 /bin 文件夹,其中包含我发布的 swf 和 html 文件 (/bin/test.swf)。
我有一个 /resources 文件夹,其中包含一个已加载的 XML 文件 (/resources/flar/flarConfig.xml)。
我有一个 /src 文件夹,其中包含我的 fla (/src/test.fla),还有一个名为 examples 的目录,其中包含我要用于文档类的 .as 文件 (/src/examples/FLARManagerTutorial_2D.as)。它看起来像这样:
package examples {
public class FLARManagerTutorial_2D extends Sprite {
this.flarManager = new FlarManager("../resources/flar/flarConfig.xml)
在我的 Flash 发布设置中,类路径只是“。”
在我的文档类中,如果我输入:FLARManagerTutorial_2D,我会得到错误:
The name of the package 'examples' does not reflect the location of this file.
我需要做什么才能让它正确识别和引用这个类并加载 XML 文件?我觉得无论我尝试哪种路径组合,我都会收到错误 - 否则 flash 只是添加了自己的空白文档类而没有任何反应。感谢您的帮助。
【问题讨论】:
标签: flash actionscript-3