1

Is it possible to embed compilation date into compiled Action Script 3 file (like in C's __DATE__ preprocessor constant)?

Is it possible to do it with custom date format?

I am using Flex for compilation

PiotrK
  • 4,210
  • 6
  • 45
  • 65
  • 1
    See: http://stackoverflow.com/questions/2656827/can-actionscript-tell-when-a-swf-was-published/4160717#4160717 – Joony Dec 30 '10 at 18:11

1 Answers1

1

Joony's answer will work, but it's a bit of a hack. I don't know if it's officially supported.

If you are compiling with Ant (or command line or other script) then you can pass the date as a compiler argument.

Compiler arg:

 mxmlc -define+=CONFIG::compiledAt,'2011-01-17 17:05:01'

AS3 code:

 public static const COMPILED_AT:String = CONFIG::compiledAt;
Peter Hall
  • 53,120
  • 14
  • 139
  • 204