AS3 - toXMLString() 和其他方法无法识别

发布于 2024-11-04 22:11:50 字数 660 浏览 0 评论 0原文

在 Flash CS4 中,我有一个使用大量 XML 的项目。以前,一切都工作正常,但最近我在尝试编译时收到这样的警告:

警告:3594:toXMLString 不是动态类 XML 的可识别方法。

警告: 3594:appendChild 不是动态类 XML 的可识别方法。

这些错误引用的代码行是:

stream.writeUTFBytes(currentXML.toXMLString());

“stream”是

currentXML.appendChild(marker.getXML());

FileStream 对象,“currentXML”是 XML 对象。 “marker”是我自己的类的一个实例,我已导入它,但我很确定这不相关。

正如我所说,这只是现在才发生的。我在我的代码中没有看到任何可以改变它的内容。即使我将更改变成注释,我仍然会收到错误。

除了这两个警告之外,我还收到其他警告,尽管它们都与 XML 类中“未被识别”的方法有关。

我使用的是 Flash Pro CS4,并且在时间线的第一帧上编码,而不是在文档类中编码。哦,我正在制作一款 AIR 应用程序,而不是 Flash Player 应用程序。

In Flash CS4, I've got a project that's working with a lot of XML. Previously, it's all been working fine, but recently I'm getting warnings like this when trying to compile:

Warning: 3594: toXMLString is not a recognized method of the dynamic class XML.

Warning: 3594: appendChild is not a recognized method of the dynamic class XML.

The lines of code that these errors refer to are:

stream.writeUTFBytes(currentXML.toXMLString());

and

currentXML.appendChild(marker.getXML());

"stream" is a FileStream object and "currentXML" is an XML object. "marker" is an instance of my own class, which I have imported, but I'm pretty sure that's not related.

As I've said it's only happening now. I don't see anything in my code that could have changed it. Even if I turn the changes into comments, I still get errors.

In addition to these two I am also getting other warnings, although all of them concern a method "not being recognized" in the XML class.

I am using Flash Pro CS4 and am coding on the first frame of the timeline, as opposed to in a Document Class. Oh, and I'm making an AIR app, not a Flash Player one.

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

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

发布评论

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

评论(1

澜川若宁 2024-11-11 22:11:50

这是我的其他代码中的问题。我有 MovieClip,其中没有导入必要的类,并且它给了我错误。它们与 XML 一起出现,但似乎无关。然而,这些显然导致了 XML 错误,因为一旦我修复了这些错误,XML 错误就消失了。之后我收到了一些变量声明警告,但它们很快就得到了修复。

因此,如果其他人也有类似的问题,请先尝试修复您遇到的任何其他错误。

It was a problem in my other code. I had MovieClip in which I hadn't imported a necessary class, and it was giving me errors. These came along with the XML ones, but seemed unrelated. However, these were apparently causing the XML errors because once I fixed these, the XML ones disappeared. I received a few variable declaration warnings after that, but they were quickly fixed.

So if anyone else has a similar problem, try and fix any other errors you have first.

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