views:

26

answers:

2

Hey guys.... this may be a stupid question, but I downloaded SWFObject & it came with several files.... it has one swfobject.js file in the root dir & another in the "src" directory.... their file size differs so I'm wondering which one I have to include in my header?

Thanks!

A: 

This file is generally generated automatically by Adobe Flash. Have you tried using that one?

ford
Hmmmm well I have always used one a colleague sent me in the past, but I thought I would download it again in-case a newer version was released. How do I go about finding the one you mention?
Brett
Go to File -> publish settings in Flash. Make sure that the HTML option is selected. Look at the resulting HTML file and it will show you where the corresponding js file is. I'd also check out pipwerk's answer since it seems closer to what you are looking for.
ford
Ok thanks for the info! :)
Brett
+1  A: 

You can use either one. The swfobject.js file in the root is the minified (compressed) version, which has a smaller file size optimized for fast downloads. The tradeoff is that it isn't human-readable. The other swfobject.js file (/src/swfobject.js) is un-compressed and human readable in case you want to make modifications.

A third option is to use the Google-hosted copy; all you'd need to do is use the Google URL src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" instead of the local file src="swfobject.js"

pipwerks
OK great - thought that may be the case but wanted to confirm! :)
Brett