How To Tell If That Cool Flash Movie Was Made With Flex
Posted by
Brad Wood
Nov 07, 2008 17:44:00 UTC
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:
- Makes an Ajax call to my server with the URL of the page in question
- The server makes a cfhttp call to the URL following any 301 or 302 redirects
- The source code is written into a temporary file on my server
- The Ajax call returns with the name of the new temp file which is loaded into a hidden iframe on the page
- It waits for 5 second to elapse to give the page plenty of time to load
- The inner html of the iframe is retrieved and searched with some JavaScript regex for SWF urls.
- Each of those SWF URLs are run through James' Flex Checker
- 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