Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>George is correct. Adobe sneaks an undocumented ProductInfo tag that contains the compilation date in to every compiled swf. The DisplayObject.loaderInfo.bytes contains the the complete uncompressed swf that loaded the Display Object.</p> <p><a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#loaderInfo" rel="noreferrer">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#loaderInfo</a></p> <p>So the quickest way to get the swf's compilation date without external libraries (from a Display Object):</p> <pre><code>import flash.utils.Endian; import flash.display.LoaderInfo; import flash.utils.ByteArray; ... private function getCompilationDate():Date{ if(!stage) throw new Error("No stage"); var swf:ByteArray = stage.loaderInfo.bytes; swf.endian = Endian.LITTLE_ENDIAN; // Signature + Version + FileLength + FrameSize + FrameRate + FrameCount swf.position = 3 + 1 + 4 + (Math.ceil(((swf[8] &gt;&gt; 3) * 4 - 3) / 8) + 1) + 2 + 2; while(swf.position != swf.length){ var tagHeader:uint = swf.readUnsignedShort(); if(tagHeader &gt;&gt; 6 == 41){ // ProductID + Edition + MajorVersion + MinorVersion + BuildLow + BuildHigh swf.position += 4 + 4 + 1 + 1 + 4 + 4; var milli:Number = swf.readUnsignedInt(); var date:Date = new Date(); date.setTime(milli + swf.readUnsignedInt() * 4294967296); return date; // Sun Oct 31 02:56:28 GMT+0100 2010 }else swf.position += (tagHeader &amp; 63) != 63 ? (tagHeader &amp; 63) : swf.readUnsignedInt() + 4; } throw new Error("No ProductInfo tag exists"); } </code></pre> <p>The SWF Specification: <a href="http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf_file_format_spec_v10.pdf" rel="noreferrer">http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf_file_format_spec_v10.pdf</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload