I’ve just packaged up SWFObject 1.4.2. (Direct download link)
This is a general maintenance release that fixes a couple of bugs, and improves version detection in Internet Explorer. Here’s the changelog:
- [updated] added one more fix for a related issue to the audio streaming bug listed below, thanks to Ben Longoria for the fix – this should take care of all the streaming audio issues, if you are still having problems after this update, please let me know
- [updated] updated the detection code for IE/ActiveX browsers to fix a crash that could occur when the user had Flash Player 6.0.21 or 6.0.23 installed (Thanks to Michael Williams at Adobe for the code to fix this (and the Adobe detection kit))
- [fixed] updated the getQueryParamValue method to fix a bug that would return the wrong value if you had two variables that ended with the same string (Thanks to Aran Rhee for discovering the issue and providing a fix)
- [fixed] fixed a couple of strict js warnings that crept back in sometime after the 1.4 update
I’ve also created a Subversion repository for SWFObject. If you are familiar with SVN, you can do a checkout from http://svn.deconcept.com/swfobject/.
Hello, my name is Jim and i have created plugin for WordPress
that it allows to insert SWFs in your WodrPress Blog. This Plugin
this plugin uses the SWFObject library. The use is very simple, this plugin
simply encloses the Javascript and insert code for insert SWFObject.
The form to insert SWF is:
[swf] pathtofile.swf, width, height[/swf]
You can see an explanation and example in: http://unijimpe.pandela.net and
download the plugin in:
http://unijimpe.pandela.net/wp-content/uploads/2006/05/wp-swfobject.zip
I can’t thank you enough for setting up a Subversion repository. This will make maintaining my copy of SWFObject really dead simple. For anyone with access to Subversion on a shared host but lacking the knowledge to use it, here’s what I recommend:
1. Create a ‘bin’ directory in your home directory and cd into it (cd bin).
2. Issue the following command: svn co http://svn.deconcept.com/swfobject/
3. Watch the nice little files as they arrive.
4. Navigate to a copy of ‘swfobject.js’ that you’re using on one of your sites.
5. Delete it! Yeah, I’m serious. Whack that thang!
6. Now do this: ln -s ~/bin/swfobject/trunk/swfobject.js swfobject.js
7. Test your site to make sure it still works.
That’s it for setup. Now for the maintenance portion:
1. Subscribe to the deconcept XML feed and watch for news of a new version.
2. When you see one, go to your bin directory and do this: svn up
Easy, huh?
Just one minor correction on that last item. You’ll need to go to the swfobject directory inside your bin directory to issue the ‘svn up’ command. My bad…
Please check out http://www.cofc.edu/~gcra/, I am attempting to use your script (good stuff by the way!) and it will not display the flash – only the content of the div. I have tried multiple browsers and computers but no luck.
Thanks,
Ian
Ian: You need to specify a required Flash Player version in your embed code.
Hello, there is something I don’t understand really…
This script is a good idea, and make easy to embed a swf objet.
But, if I don’t have JavaScript activated, I can’t see the swf,
althought I have the FlashPlayer?
And by the text remplacement, like on Slideshow Pro, they ask me
to download FPlayer 7 (I have FPlayer 8) !!??
Isn’t it a problem?
1 – you haven’t FPlayer -> ok
2 – you have FPlayer (with js) -> ok
3 – you have FPlayer (without js) -> hum…
Today, with Ajax & co, JS activated on the browser is more and more an obliged way, but you know that not all surfer have Javascript activated…
What is your position? Do browsers (and surfers) all have to support Javascript?
Thanks for your answer.
[and sorry for my English :( ]
Hello,
Currently when people try to install flash that don’t have administrative access on windows, it will display the message “There was an error downloading the Flash Player update. Please try again later, or visit macromedia.com to download the latest version of the Flash plugin.”. This isn’t a problem, but the rest of the webpage will hang so that no content is being displayed after the error was generated. Any insight on a work around?
In the Express Install code (expressinstall.as) you can specify actions to take if the upgrade fails. This could be redirecting them to a different page, or doing nothing so they can access the other content on the page. I’ve never seen the install lock up the browser like that though…
It looks like there is a problem with swfobject and a flash movie containing an “ExternalInterface.call”. in IE ( on windows ) you get an error everytime the javascript finishes.
when I was trying some things in the code I noticed it was because of the id you write to the object-tag for IE, when I removed this it worked.
Are you sure? Maybe you are using the same Id somewhere else on the page? All of your Ids need to be unique.
I’ sorry for link broken for download plugin for WordPress, one new link is done in: http://www.et-constructora.com/wp-swfobject.zip.
Thank for visit and download.
Hello,
the same question, sorry, but you don’t answer me…
Isn’t there a problem if I have the FPlayer, but javascript disable ?!
Because all days on the Net we speak about accessibility, and solutions to give access to the information with all browser and technologies… like some websites which you can “see” without javascript enable… What is your point of view (Geoff and the others ?!).
Thanks very much
(it’s a question I can’t answer in fornt of my clients !!)
Laurent
Hi guys,
I saw the express install in action in my Firefox. It really looks cool. I would like to use it on my fla. But from the code underneath (some comes commented by default) I do not know what to change or modify, and my movie stops on frame 2. I know its something stupid, but hey, its more stupid not to ask. ;-)
Thanks
+++++++++++++++++++++++++++++++START FRAME 1
// used for express install – not required for plain SWFObject use
// for more info, see http://blog.deconcept.com/swfobject/
#include “expressinstall.as”
// initialize the ExpressInstall object
var ExpressInstall = new ExpressInstall();
// if the user needs to upgrade, show the ‘start upgrade’ button
if (ExpressInstall.needsUpdate) {
// this is optional, you could also automatically start the
// upgrade by calling ExpressInstall.init() here instead of the following lines
// attach the custom upgrade message ** NOTE: see notes in Upgrade Message movieclip re: types of content to use
var upgradeMsg = _root.attachMovie(“upgradeMsg_src”, “upgradeMsg”, 1);
upgradeMsg._x = Stage.width / 2;
upgradeMsg._y = Stage.height / 2;
// attach the button actions that will start the ExpresInstall updater
upgradeMsg.upgradeBtn.onRelease = function() {
ExpressInstall.init();
}
// if expressinstall is invoked, stop the timeline.
stop();
}
// —–
// alternate usage:
// —–
/*
// test to see if install is needed:
if (ExpressInstall.needsUpdate) { // returns true if update is needed
ExpressInstall.init(); // starts the update
stop();
}
// otherwise, start the movie normally
*/
+++++++++++++++++++++++++++++++++++END FRAME 1
===================================START FRAME 2
// no upgrade needed, start the movie
stop();
if (flashVarText != undefined) {
flashVar_txt.text = flashVarText;
}
======================================END Frame2
Just wanted to show you an article called “Finding the best way to insert Flash” I wrote about covering all bases when displaying Flash. It combines SWFObject and Flash Satay in quite a verbose manner to support browsers both with and without JavaScript as well as allowing a graceful fallback for browsers without Flash Player.
Interesting, but I think it’s a bit of overkill… SWFObject already allows you to have fallback content if the user doesn’t have Javascript enabled, and one of the major benefits of that is having Google index that non-flash content. If you replace it with a normal Flash embed, or Flash Satay (which by the way has many issues just in itself) then you are losing a big advantage to using SWFObject in the first place.
ok. THis is driving me nuts.
I have installed all of the files (expressinstall.as, swfobject.js, html and swf) in a single folder. If I play the html file from my desktop it works fine. If I load the folder onto a server it will correctly do the browser detection but when I try to click on the “start update” button, nothing happens?
Any ideas?
But the users with javascript disabled still won’t see the Flash, and if you work with commercial websites with Flash ads (like I do), you do not want those users to miss out. Google will still index whatever is found within the <noscript> and/or the inner <object> tag.
Hello Geoff,
thank you very much for developping the script – i really appreciate it :)
I just want to submit a question concerning swfobject.html :
Users with the Flash plugin ENABLED but with Javascript TURNED OFF will only see the alternate content.
But they should see the SFWOBJECT or do i misunderstand something ?
I has used the SFWOBJECT with expressinstall feature, but when i test using IE wth flash MX install, it doesn’t automatic install instead show the non flash content (in my case was a flash jpg), which user need to click the button and the forwarded to adobe website.
It fail to auto-upgrade itself and i wondering if i ever making some mistake somewhere rather that this SFWOBJECT is now longer working because adobe put restriction or something…
somebody please correct me…
HTML code
<div id=”flashcontent”>
<strong>You need to upgrade your Flash Player</strong>
<br><br><br><br><br><br><br><br><br><br>
<br><br>The content of this web site requires the latest version of Macromedia Flash Player
<br><a href=”http://www.macromedia.com/go/getflash/”><img src=img/flash_8.gif width=62 height=80 alt=”flash 8″>
<br><a href=”http://www.macromedia.com/go/getflash/”>Get Flash</a>
</a></div>
<script type=”text/javascript”>CDATA[
var so = new SWFObject("mysite.swf", "sotester", "1024", "614", "8.0.23", "#e6e7e1", true);
so.write("flashcontent");
// ]]>
</script>
AS in the first frame
#include “expressinstall.as”
// initialize the ExpressInstall object
var ExpressInstall = new ExpressInstall();
if (ExpressInstall.needsUpdate) {
var upgradeMsg = _root.attachMovie(“upgradeMsg_src”, “upgradeMsg”, 1);
upgradeMsg._x = Stage.width / 2;
upgradeMsg._y = Stage.height / 2;
upgradeMsg.upgradeBtn.onRelease = function() {
ExpressInstall.init();
}
stop();
}
First, i want to thank you not only for the amount of time you have spent creating this, but also the time that you spend keeping i updated.
I use this script on many of my company’s sites, including LiveTone.com.
I have a wish list item to add, if possible… when i click on one object, is it possible to have swfobject stop any other movies on the same page from playing, with the result that on any given page, only one flash movie is playing at a time.
Cheers,
Mit Rowe
9trackMind, Inc
really Rowe?
why am see no flash object anywhere in your site? wondering if you just wanna promote your link here…
zam…
it was a serious question; i’m trying to fix a problem with my site and turning to the community for help.
there are flash objects on the livetone.com site. look at the play buttons on the charts.. heck, the mixer itself is flash :-P
Mit: that’s not something I would add to SWFObject. You could do that using LocalConnection or ExternalInterface, etc. so there is no need to put someting like that in a javascript file for embedding Flash.
I’m closing this post’s comments – if you have any SWFObject questions feel free to post in the newest SWFObject post, or send a message to the mailing list.