是否可以在 Flex 项目的动作脚本中检索 swf 元数据?
我知道可以将 swf 元数据作为命令选项添加到编译命令中,但我找不到任何有关如何在运行时在操作脚本中访问这些元数据的文档。我们尝试在编译时向 swf 添加版本号,然后在运行时在应用程序的某个位置检索它,下面是添加描述元数据的命令示例。
mxmlc -description "version 1.2.3"
我知道搜索引擎和其他实用程序使用 swf 元数据来收集有关 SWF 文件的信息,但您肯定应该能够在运行时在操作脚本中检索它们吗?
I know that it is possible to add swf metadata to the compile command as a command option, but I can't find any documentation on how to access these metadata within the actionscript during runtime. We're trying to add a version number to the swf during compile time and then somewhere in our app we would retrieve it during runtime, here is the command example to add the description metadata.
mxmlc -description "version 1.2.3"
I know the swf metadata is used by search engines and other utilities to gather information about the SWF file, but surely you should be able to retrieve them in the actionscript during runtime?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过像这样命名它: http://hasseg.org/blog/?p=165
所以也许 "-define+=VERSION::description,"version 1.2.3"
然后使用示例代码访问它:
编辑:嗯。在 Flex Builder 中对我不起作用,但我发现了这个: < a href="http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html" rel="nofollow noreferrer">http://livedocs.adobe.com/flex/3 /html/help.html?content=compilers_21.html,这似乎证实了这个想法。
Have you tried to namespace it like this: http://hasseg.org/blog/?p=165
So maybe "-define+=VERSION::description,"version 1.2.3"
And then access it using the example code:
EDIT: Hmm. Doesn't work for me in Flex Builder, but I found this: http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html, which seems to confirm the idea.