As an avid Flash RIA developer, I have long wanted to be able to embed into a SWF some information about the version, or at least BUILD DATE, of the SWF (other than just its file creation date, which can get munged very easily). For instance, if the SWF could embed in it somehow the date it was compiled (published), and this date were accessible in some way to Actionscript, then this date could be shown in an about menu in the app. Then, when someone makes a bug report on your SWF RIA that has been publicly distributed to thousands of users, you can definitively tell which actual version they have used (maybe a browser-cached older version, for instance).
When I used to do traditional app dev work, compiling good ol’ EXE’s and such, we had facilities for this, but I’ve never been able to find a way to have it automatically done in a SWF asset compilation.
Sure, I can manually update the version or build date in a variable inside my AS, but as Flash RIA components simultaneously tend to: a) get very long and complex b) require FREQUENT re-publishes during testing So, I’ve found it’s way too easy to forget to update the version or build date data, so ideally I’d want a process that did so automatically as part of a build so that I couldn’t forget.
And EVEN IF that information couldn’t actually be accessed via normal Actionscript API calls, if it were present at all in the bits inside of the SWF, there might be some hope by having a SWF examine itself via ByteArray or something.
My only thought on this so far, in relation to using standard AS variables to keep track of this information, requires that I have some external “build” script of sorts, which automatically updates an .AS file (either a class file, or just a regular .as script file that gets "include"d in my project) before telling the Flash IDE to publish. Maybe some sort of JSFL script inside the IDE or something.
Anyone have any thoughts on this, or ever dealt with this challenge before?