James Ward has a little tool called "Is It Flex" that will tell you if a given SWF file was made with Flex providing you know the URL to the SWF. James uses the SWFDump utility from the SDK and looks for some header info that the Flex compiler places in the SWF. A while ago I experimented with an ancillary tool on my site which attempted to find the URLs to all the SWFs in the page for you and check them all at once.The current version is located at http://www.bradwood.com/is_it_flex/. What my tool does is:
  1. Makes an Ajax call to my server with the URL of the page in question
  2. The server makes a cfhttp call to the URL following any 301 or 302 redirects
  3. The source code is written into a temporary file on my server
  4. The Ajax call returns with the name of the new temp file which is loaded into a hidden iframe on the page
  5. It waits for 5 second to elapse to give the page plenty of time to load
  6. The inner html of the iframe is retrieved and searched with some JavaScript regex for SWF urls.
  7. Each of those SWF URLs are run through James' Flex Checker
What my tool DOESN'T do is:
  • Parse HTML inside of frames
  • Handle pages designed to break out of frames
  • Work well with pages which attempt to make an Ajax call. (A security warning is thrown since the request is now coming from my domain)
  • Suppress pop-ups, alerts, existing JavaScript errors and embedded music from the target page
If you are having JavaScript problems with my Flex Checker, you can use an older version located at http://www.bradwood.com/is_it_flex/old/ This version just does a cfhttp request to the page and directly parses the HTML that comes back without executing an JavaScript. Unfortunately, a LOT of sites use JavaScript to dynamically write the SWF files into the DOM, so this method won't always find the SWFs. Unfortunately, I haven't found a reliable way to parse JavaScript and definitively find out the SWFs on a page all via ColdFusion. If you have a tricky page that my tool can't seem to root up the SWFs for, then your only option might be to fire up Fiddler or Firebug to capture the SWF files being loaded and manually plug there URLs in over that James' tool.