2

Background: I manually update a version timestamp in my Flash document, which is displayed on the log-in screen of the application at run time. This helps me verify that I have the latest version loaded in the browser, rather than some cached version.

The declaration for the variable is:

public static var version:String = "v 2012.11.14.1854"; //yyyy.mm.dd.hhmm

Is there a way to have this value automatically updated to the current system time when the document is compiled in the flash IDE? Perhaps with some kind of "compile time variable".

4

1 回答 1

0

a) 您可以创建 ANT 任务来构建,并且可以在那里设置变量,但如果您是单独开发而不使用 SVN 或 Perforce,这是一个相当复杂的解决方案。

b)我不确定它是否会起作用,但使用额外的编译器参数(项目属性> Actionscript 编译器)

-date text

这会在生成的 SWF 文件中设置元数据。我不确定,您如何访问它,我还没有测试过。

于 2012-11-22T14:42:34.487 回答