How to get a Flash file to overlay on a URL submitted by form.
November 29, 2007 4:14 PM   Subscribe

I'm looking for the simplest way to accomplish what happens here.

User enters a URL and a Flash file plays on top of that website. I tried tracking down the script they use in the demo with no luck. Just to clarify - I'm only interested in the process of getting the Flash file overlaid on the submitted website, not the process of creating the swf.
posted by davebush to Computers & Internet (5 answers total) 2 users marked this as a favorite
You could just have an iframe with that takes up the whole window, and position your SWF over that, however that's done... with a div or whatever.
posted by mpls2 at 4:29 PM on November 29, 2007

sorry, that should be "... with <the url> that takes ..."
posted by mpls2 at 4:30 PM on November 29, 2007

To add to mpls2.... your SWF goes in a DIV that has a z-index higher than the page you're layering it over, and the SWF has wmode set to transparent.
posted by spilon at 4:50 PM on November 29, 2007

Pretty straightforward, actually. If you notice, the URL has innovateads in it. So all they are doing is pulling out the HTML of the target site, and then probably inserting an <object> tag just before </body>. It's exactly the same way that google translates websites, etc.
posted by Deathalicious at 5:40 PM on November 29, 2007

The example site mentioned grabs the source of the target page (with something like cURL), inserts a script tag to add the extra features, and also inserts a BASE HREF tag so that images etc. are still retrieved from the original site.

Note that this approach is a really bad idea if you have any kind of login-protected stuff on your domain or you're concerned about your server being used to push malware. Unless you carefully proxy, parse and filter every tag, attribute, script, etc. it's wide open to cross-site scripting.
posted by malevolent at 4:42 AM on December 2, 2007

« Older using my account to pay friend's debt   |   Books about places? Newer »
This thread is closed to new comments.