Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3393084
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:00:31+00:00 2026-05-18T04:00:31+00:00

I’d like to write a little class that adds a Day/Month box showing the

  • 0

I’d like to write a little class that adds a Day/Month box showing the date a SWF was published from Flash.

The company I work for regularly produces many, many SWFs and many versions of each, iterating over the course of months. A version-tracking system we’ve been using to communicate with our clients is a Day/Month date-box that gives the date the SWF was published. Up until now, we’ve been filling in the publish date by hand. If there’s any way I can do this programatically with ActionScript that’d be fantastic.

Any insight? Basically, all I need is the call that gives me the publish date, or even.. anything about the circumstances under which a SWF was published that I could use to roll into some form of.. automated version identification, unique to this SWF.

So, can ActionScript tell when a SWF was published?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:00:32+00:00Added an answer on May 18, 2026 at 4:00 am

    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.

    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#loaderInfo

    So the quickest way to get the swf’s compilation date without external libraries (from a Display Object):

    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] >> 3) * 4 - 3) / 8) + 1) + 2 + 2;
      while(swf.position != swf.length){
        var tagHeader:uint = swf.readUnsignedShort();
        if(tagHeader >> 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 & 63) != 63 ? (tagHeader & 63) : swf.readUnsignedInt() + 4;
      }
      throw new Error("No ProductInfo tag exists");
    }
    

    The SWF Specification: http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf_file_format_spec_v10.pdf

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a small JavaScript validation script that validates inputs based on Regex. I
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.