Copy link to clipboard
Copied
I want to display the date when a SWF was compiled. Is there a way to set the value of a variable when a SWF is compiled?
I have this code for the context menu. But of course the date displayed is the date when the SWF is running, not when it was compiled.
var date:Date = new Date();
var newContextMenu:ContextMenu = new ContextMenu();
newContextMenu.customItems.push( new ContextMenuItem("Compiled Date = " + date.toString()) );
contextMenu = newContextMenu;
Thanks!
Copy link to clipboard
Copied
i'm not sure that makes any sense, but you can approximate it by usin:
trace(new Date().time);
and then use that value to create your Date object.
Copy link to clipboard
Copied
Right now I am compiling twice, first to get the date string from a trace, then I copy that date string and paste it as the value of a variable. It's not ideal. I was hoping for a solution using something like JSFL that would generate this before I compile the SWF.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now