FlashObject 1.3 Released

I have just released version 1.3 of FlashObject. Changes are as follows:

  • [Changed] When calling FlashObject.write() you can now pass an HTMLElement reference. Previously you needed to pass a string (the Id of the element to write the Flash content to)
  • [Changed] Made changes to the plugin detection routine that would cause a crash in browsers running certain versions of the Flash plugin. Read a comprehensive description of the issue and the fix.
  • [New] You may now specify a specific URL to redirect the user to after they complete an ExpressInstall process. Previously the script would always redirect them to the page the Flash movie was embedded in, but when using a popup window this is not always the best solution. See the ExpressInstall section of the FlashObject page for more information.
  • [New] FlashObject now integrates seamlessly with the Javascript Integration Kit. More information on this is forthcoming in a new blog post.
  • [New] I’ve used Dojo Shrinksafe to strip out the extra space in the flashobject.js file. FlashObject now weighs in at just a hair over 6kb. Super tiny! The FlashObject ‘source code’ (un-shunken Javascript) is included in the FlashObject zip file in the ‘source’ folder. I also made a number of small syntax changes to reduce the size even more.

I’ve updated the FlashObject page to reflect these changes. I recommend that everyone should upgrade if you are using any older version of FlashObject. If you are upgrading from v. 1.2, you can simply replace your flashobject.js file and you should be ready to go. Versions earlier than 1.2, you may need to make minor adjustments to your embed code (see the changes to v. 1.2 for help with that)

UPDATE (1-25-2006): Found a small bug in this latest version that caused the Flash movie to not load on IE 5.01 on PC. The bug has been fixed and the zip/source has been updated. Please update to the latest version if you are using 1.3 and have a lot of users using IE 5.01 (does anyone have a high number of those anymore?). The new version number is 1.3b.

191 thoughts on “FlashObject 1.3 Released

  1. I just double checked in IE6 and it worked fine (had 7 installed and visited my example page here.) Are you sure you have it all set up properly?

  2. I was testing with 6.0.79 of the player installed–everything, as you say, works fine with FP 7 installed. Does FlashObject only support FP7 or greater–why not support the minor revisions of the player that support express install? If I’m asking questions that are answered somewhere else, my apologies–just point me in the right direction.

  3. Ah, you are right. I found the issue and fixed it – it will only affect people who have Player version 6 installed – it’s all fixed up now, grab the zip again and give it a try. (new ver. is 1.3a)

  4. Don’t know if anyone else got the JS warnings in Firefox about the undefined array indices. Here is the correction I have changed to flashobject.js (around line 148)


    148 com.deconcept.PlayerVersion = function(arrVersion){
    149 this.major = (typeof(arrVersion[0])!='undefined' && parseInt(arrVersion[0])) || 0;
    150 this.minor = (typeof(arrVersion[1])!='undefined' && parseInt(arrVersion[1])) || 0;
    151 this.rev = (typeof(arrVersion[2])!='undefined' && parseInt(arrVersion[2])) || 0;
    152 }

  5. Those arne’t actual Javascript errors, just warnings that Firefox will throw if you have strict mode turned on. In this case, i’d rather leave it how it is to reduce the file size since the code is perfectly valid.

  6. Hey Geoff, thanks very much for being so kind to share your stuff with all of us…

    just a little Q.. is it just me (could be) or doesnt the ExpressInstall work on firefox? I tried on IE6 and Netscape7 and it seems to work fine. but on firefox it just displays the alternate content but no expressInstall prompt

  7. One other question, it looks to me like you’ve backed away from using a class for the express install. This in theory means that FlashObject can be used as is by those of us who export our classes on a frame later than frame 1. Is this assertion correct?

  8. It should work in every browser that supports FlashObject (which is almost all of them).

    You might try grabbing the zip again, I updated it yesterday to v. 1.3a because of a problem with the ExpressInstall version detection.

  9. Yes, I changed the ExpressInstall stuff to an include instead of a class because of the preloading issues some people had.

  10. ok.. im stupeeeed.. i missed that part where expressinstall minimum requirement is Flash player 7 (or 6.0.65) …. i had 6.0.21 for test. (then again it worked on IE, lol)..

    have another question if you dont mind.. how much OVER HEAD does this script add a webpage? I plan to include this on all my webpages (incase visitor lands on subpages, not main).. does it have any significant impact of sorts?

    also, is there a way to use a cookie or something to REMEMBER if the user has the required flash player version? so instead of running the whole Player Version Checking routine everytime a page is loaded, it only checks ONCE and remembers the result of the check.. coz i dont think it’s necessary the script to keep checking all the time..at least ONCE on a user’s browser…

    I did this for my site, but using PHP coz i dont know java. would be great if flashObject could do this by itself.

  11. It’s really no overhead at all… I’ve never run any time tests on the IE checking, but in Firefox or other plugin browsers, you are only checking values in an array and then doing some basic regex stuff, which is so fast you’d have to have thousands of Flash movies embedded before you notice it.

    The script itself is only about 6kb, and since it’s an external file, that will be cached once your users view it once so the overhead there is next to nothing.

    The script only does things as the page loads, so once the page is loaded it’s basically not there, and the performance should be identical to a ‘normal’ Flash embed. If you really wanted to get anal about things, you could delete the FlashObject reference after you call write(), but in 99.99% of the time this won’t be neccesary.

  12. ahh great! deleting my php cookie check routine.. hehehe

    But i have noticed something i’d like to get you, and others confirm on..

    my flash movie runs at 30fps and has na animation starting from frame 3 to 10.. animation is a logo coming in from the left and stopping at the right corner.. on IE i dont see this animation anymore..when the flash appears it shows the logo at the right side already.. in firefox it’s normal.

    Im sure it’s not IE only as i have 2 html pages, one is normal embed, and the other is using FlashObject.. everything else on the page is the same.

    My thinking is that it seems flashObject has loaded the swf internally already (hence started playing the animation) and when it is finally shown, it’s passed frame 10 already..

    to prove my theory i moved the animated logo down 15 frames (animation starting at frame 18)… and sure enough as soon as it’s shown on IE the animation plays..

    BUT.. now back in firefox.. it’s got quite a delay before the logo animation came in due to animation starting in the later frames

    What are your thoughts?

  13. I got used to put my noscale swf files into a table with params width=100% height=100%. But normally there are no scrollbars. So I put gifs- it goes like this:
    <table width=100% height=100%><tr><td>here flash.swf</td><td width=1><img src="bl.gif" width="1" height="580" ></td></tr><tr><td height="1"><img src="bl.gif" width="760" height="1"></td> <td height="1" width="1"></td></tr></table>

    Now if user has too small resolution flash doesn’t scale but scrollbars appear and everything is OK. How can I do this with FO ? This is the only reason I don’t use it in all my projects – I’d like to.

  14. Well you can still use FlashObject with tables like that if you wanted to. Just set up the page like you used to, but instead of the object/embed tag, you place a div in the td and the FlashObject code after that.

    I think what you really want to know is how to have a minimum height and width without using tables or using web standards. It’s not the easiest thing in the world to set up, but you could try using the css min-width property (doens’t work in IE, though). I’m not sure i’ve seen a good clean way of doing this without tables.

  15. Just used the new FlashObject (1.3) in a site currently in development. When checking in some old browsers, I ran across a problem where *neither* the flash nor the alternative content would show up in IE 5.01. The entire page would load, however the areas for flash would be blank and the page would still appear as if it was not finished loading. Again the Browser was IE 5.01 w/ Flash 8 Plug-In.

    I fixed it by reverting back to FlashObject 1.23 js (the most curerent previous release I had available.)

    I’m not sure how much a priority IE 5.01 is, but I figured I would let you know.

  16. Just set up the page like you used to, but instead of the object/embed tag, you place a div in the td and the FlashObject code after that.

    Yes. I was trying to do so but it failed. At last I cut out “DOCTYPE” tag and it works!

  17. Hey.. Is it possible that using this technique causes errors when I want to use ExternalInterface to call a Javascript function?

    It works fine in Firefox but in IE I get errors.. When I use the Macromedia detection method it works fine..
    Did I do something wrong?

    If you need more details let me know..

  18. I am also having some problems with fo and externalInterface. At first FF was working great and IE wasn’t able to use externalInterface calls, but now I am having problems in both. Also when I pass a parameter to my swf with fo it is picked up fine in FF but doesn’t go through on IE6. Just to let you know. By the way I really love flashObject. Thanks for your efforts and contribution.

  19. Hi, I wonder if someone can help me out regarding the flashobjects Express Install mechanism. I’m launching my flash8-swf in a new browser window with a javascript window.open command to set it 800×600 and with toolbar=no resizable=no etc. And when pointing my browser to the url with flashplayer6.0.65 or later installed, it autoupdates to flash8 just like I want to, but then when the update is finished, the 800×600 window is killed and the new browser window is opened in a fullscreen mode which I don’t want to!. Do somebody know a way to control this new browser window to also be 800×600 and noresizable etc?

  20. I added a new feature in FlashObject that will help your exact problem.

    When you embed your movie, add this to the embed:

    ...
    fo.setAttribute("xiRedirectUrl", "http://www.example.com/yourlaunchpage.html");
    ...

    where ‘yourlaunchpage.html’ is the page that opens the 800×600 window. This way all your users will always see the site how you want them to see it. Just make sure that the url is the absolute URL to your page (the full address).

  21. I do think it would be great to create a mailinglist about your new release of FlashObject, and by the way, I discover it last month… What a great piece of work!!! I have implent it to all my site :).

  22. GJHead,

    Thanks, there was an issue – when I updated the script I left out the closing object tag and while IE6 was ok with that and still displayed the Flash movie, IE 5.01 was not so forgiving and would display a blank Flash movie. It has been fixed now, so grab the latest copy (v. 1.3b) and try it out.

  23. Pingback: Thomas Piart

  24. Where do we get the version 1.3a I see 1.3 but no 1.3a zip. I’m having detection errors with version 6.0.65 not detectinga te all, just putting the .swf right in regardless of version

  25. Got this same bug in IE6 (unsure which version code). Seems to work beautifully on Firefox 1.5, spits out glorious nothing on IE.. I’ll download 1.3b and see what changes

  26. Hey Geoff. I checked the page you gave me, but the example doesn’t send data from the Flash file to the html page.

    I have 2 issues with my page.
    http://www.byontik.com/hvk/index.asp (uses your flashobject)
    http://www.byontik.com/hvk/index.html (uses macromedia method)

    Flashobject results in a javascript error in Internet Explorer.
    If I change the flash file (categorie.swf) and leave the following rule out.

    ExternalInterface.call(“setCat”,cat_muziek,cat_theater,cat_dans,cat_kunst,cat_av,cat_literatuur,cat_musea,cat_streektaal,cat_monumenten,cat_festival,cat_educatie);

    It doesn’t result in an error. With the Macromedia method: no errors..

    Any Idea why this happens?

    The other issue is weird and I don’t even know what causes it.. Again in Internet Explorer after clicking on any flash file when you close the browser I get a memory error.. (it seems to happen on random basis, so not every time).

  27. Ah,

    The issue is that you are usign the same Id for the div your Flash is in, and the Flash movie ‘categorie’. If you give your Flash a unique Id (the second argument in the FlashObject call) it should start working.

  28. “fo.setAttribute(“xiRedirectUrl”, “http://www.example.com/yourlaunchpage.html”);

    About redirecting to launch pages…is it possible to set FlashObject to direct users with 800×600 or smaller screens to a toolbar-free popup that is as big as possible, but still use the usual inline method for other users? Would there be any issues with validation by doing this using screen_size.width/screen_size.height?

    Cheers :D

  29. 3stripe: sure, you can detect resolution and direct them wherever you wait… that would be completely independant from FlashObject.

  30. Thanks for this great work Geoff. I was looking at the Flash Satay method and then found your solution. I was wondering if there is a reason you chose not to combine the Satay method into your solution?

    For example, it looks like you are still using the embed tag which is not part of the XHTML specification.

    I’d love to hear your reasoning behind this.

  31. Also, in the second bullet point in this post it says “Read a comprehensive description of the issue and the fix.”

    Is that supposed to link somewhere that contains the description?

  32. SixSide: The short answer is that using only object tags is buggy in many browsers. Opera has certain issues, and Safari has other issues, and it makes it very tough to just use a single way to embed plugins in every browser.

    There are also other issues with Flash Satay (that are covered on the FlashObject page) like preloading/streaming of swf files and accessibility.

    And yes, that was supposed to be a link – I fixed it (thanks!)

  33. I’m getting a strange error message when compiling after adding the express install code:

    “**Error** /Users/james/Library/Application Support/Macromedia/Flash 8/en/Configuration/Include/expressinstall.as: Line 21: Classes may only be defined in external ActionScript 2.0 class scripts.
    class ExpressInstall {”

    Can’t work out why though?

  34. i tried the download (which says “..1-3.zip”), the readme reads 1.3a version. it didnt work for ie users, you cannot see the flash content!!! so i relloed back tu 1.23 version js, but still cannot fix it, IE users dont see my page, and thats 50% traffic!!! where is 1.3b download??? already for months i loose 50% of my traffic :(

  35. 3stripe: you are trying to use the old ExpressInstall.as file – make sure you have the latest one from the 1.3 zip file.

    Valters: I forgot to update the readme file, but the flashobject.js in the current .zip file is 1.3b. The problems in IE were only for IE 5, not IE 6.

  36. I’d like to add 2 more parameters so this will pass WCAG Priority 3 guidelines: accesskey and tabindex – before i fool around with the .js file, is there an easy way to add this?

  37. Brent: you’d have to edit the js file to get those in there. Although I’m not sure it would really be neccessary – since you can set tab indexes inside Flash, couldn’t you just index the buttons and items inside the Flash movie and skip the actual object/embed tag?

  38. Do you allready have some info on how we can use the Javascript integration kit with FlashObject ?? If you can give me a little pointer I thionk I can figure it out.. Thanks for all the great work which makes my live easier :> Nyls

  39. So Geoff, why don’t you set up a PayPal donate button for FlashObject?!

    I bet plenty of other people in addition to myself would like to make a small donation in recognition of all the good work you’ve done on this!

    PS. A forum would be nice as well, and save answering everything on this thread? http://getvanilla.com/ maybe?

Comments are closed.