views:

283

answers:

3

A site I use displays a flash file, which is embedded dynamically using SWFObject. I want to download the flash file locally, so I can run it when I don't have access to the net. However, when I try to open the url to the swf file, it demands an 'id' parameter that is normally passed by the SWFObject Javascript.

Specifically, the source of the page contains:

swfobject.embedSWF("/bin/loader.swf", "main", "100%", "100%", "9", false, flashvars, params, attributes);

And the flashvars have the following definiton:

var flashvars = {
  file_id: "imilc2lxnfft",
  app: "main-502.swf",
  show_play_button: "false",
  autoplay: ""

When I try to access site.com/bin/loader.swf, it says it requires a file_id parameter.

How do I pass the parameter and download the file to my desktop?

A: 

I guess the loader.swf is a preloader that loads the original movie based on the file_id parameter.

Amarghosh
+1  A: 

You'll need to create a webpage to house the SWF you've downloaded that passes the same flashvars to it as the webpage you're getting it from. I'd use Firefox's right-click "save web page" function; choose to save 'Web page, complete'. This will save the page and all its support files somewhere. Then you should be able to edit that page down just to display the embedded SWF applet, and pass the necessary flashvars to it.

Jez
A: 

Save locally (with a D/L manager):

http://example.com/bin/loader.swf
http://example.com/main-502.swf

And create a local HTML file with the SWFObject JS code, including the flashvars and a <div> in your page with the right id (id="name" in this case).

It's also possible you don't need the loader, and the 2nd swf file will work standalone.

orip