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. Hi Geoff,

    firstly a big thank you for your flashobject, it’s helped me out a great deal so far!

    Could you explain why i’m possibly gettign the error “operation aborted” when my flash object loads in explorer? The site loads in the background fine, but you cannot access it because of the above error. This does not happen with Netscape, Mozilla or Opera browsers.

    Any pointers???

    Thanks in advance! :)

  2. as an update, i’ve seen that you have covered this error for users with flash player 6,0,65. Just to add, I am using the script to detect for flash player 8.

  3. Geoff,
    Many thanks for the tight code.

    Is there a way within your solution for detection to happen before the alternate div elements are loaded? If I view source on the page I’m testing, even if my Flash is detected, the alt text and HTML links/image calls still show up.

    I’m using a non-Flash, HTML version of the page for those who are detected not to have Flash, with the HTML inside the alternate div. It’s about 170K in HTML and images of alternate content, all told. Is there a way to not have that data called from the webserver if I’m going to write out the Flash movie instead, using your code? I’ve tried using onLoad functions and Apache SSIs to no avail.

  4. Hi Geoff and blogger,

    please let me know why I always get a JS error if I use a JS-slideshow for the non-flash content.
    Is there a way to solve that problem? What I have to do to fix that problem?
    Here is the link to a concept page showing the problem:
    http://www.njm.de/deconcept/index.htm

    Thank You for any help!
    All the Best from Berlin, Germany
    Nils

  5. It looks like it’s because when FlashObject inserts the Flash content, it overwrites the slideshow content. So when the slideshow js kicks in, it can’t find the objects it is supposed to slide (the images).

    So you need to either change the slideshow so that it fails siliently if it doesn’t find the images, or set a variable when the Flash content is embedded that tells the slideshow not to initialize.

  6. Geoff,

    First, thanks for sharing this with all of us.

    I would like to utilize FlashObject, specifically the ExpressInstall function with a Flash 8 FLVPlayer. I’m having trouble getting ExpressInstall to work since I have to export the swf as Flash 8 for the component. If I export as a Flash 7 movie, the ExpressInstall works, but the player doesn’t function properly (because of the Flash 8 dependencies.) If I export Flash 8 movie, the ExpressInstall doesn’t function/show up properly. I’ve used your fo_tester.fla to compare and test — and I get the same result.

    Am I correct in this assumption that ExpressInstall won’t work in this case (where Flash 8 is required?)

    Thanks — Matt

  7. I too have been having problems with a Flash 8 swf file. I can get everything to work with older swf files but when it comes to detecting a flash 8 swf, no dice on the express install. If anybody can figure out why, that would be awesome as I’m exhusted trying to figure out something that should be so simple.

    Great script when it works correctly!

  8. Geoff,

    The IE 5.01 bug (missing closing object tag) is fixed in the source file (flashobject_source.js) but not in the Dojo Shrinksafe version (flashobject.js). That line (flashNode += "";) got added to the if block above it (if(pairs.length > 0)).

    The line that appends the movie parameter also has an extra double quote at the end, and an extra forward slash (or the other param tags are all missing a slash, either one).

    Other than that, great script. Thanks!
    Jeff

  9. Geoff,

    I found your flashObject about 6 months ago, and have used it on every site I worked on since. It is great. Thank you.

    However, is there a bug in AOL for Macintosh where the flash movie is embeded twice? I do not have a macintosh to test this with, but one of the clients I built a site for says, there are two movies embeded.
    Thanks again.

  10. Are there any solutions to the problem where the flash.ocx file is locked by another browser window or an app like MSN Messenger?

    If I setup FO to require a Flash player greater than what is currently installed and the user has multiple IE windows open (or 1 browser + MSN) after the user upgrades Flash to the latest version they still can’t view the movie until they close out of all apps that use the flash.ocx file. And all Flash detects indicate it’s still the old version — until after the restart.

    Help!

  11. HI! I noticed a possible bug. I used the sample files with the express version and html file as given and they work fine even when republished tageting player 7 in the flash settings. However when I tried to target version 8 of the player when publishing and in the html having it set to “8.0.22” ( like it is as given in the zip file)it does not detect and no longer works either. All I got was a orange screen in IE 6.0 (latest version and all fixes ).

    Can someone else confirm this?

    Paul

  12. Im having a problem with using flashObject with FlashJS Kit. When i call a function from JS to AS it works, but when i call a function from AS to JS it gives me the error “‘FlashProxy’ is undefined”. Or when i call a fscommand from within my flash it says that “object doesnt support this method or property”. Please help !

  13. I am using the your flash detection script on my site.
    Here is what I am using – FlashObject v1.2.3: Flash detection.

    Some users are complaining that they are seeing a blank page.
    Here is what they have :
    flash player 8 installed – on Windows 2000 Pro and IE 6.

    Did you ever encounter similar problems with other users.

    Any suggestions are welcome.

  14. Paul,

    Todd, I’m not sure what k2 is, but theoretically it should work with wordpress. You should take a look at the old WordPress plugin (it’s linked from the bottom of the FlashObject page).

    Paul,

    Have you tried visiting my ExpressInstall test page? See if that works or if you get the orange screen – it’s the same file that is included in the FlashObject zip file. If you are still having issues, try sending a mail (with example links) to the FlashObject mailing list so we can take a closer look.

    ntraju,

    v.1.2.3 should not have any issues like that, but you could try upgrading to FlashObject 1.3c and see if they still have the same issue.

  15. If anyone is having problems with EnternalInterface, please read my experiences below. I’ve been hammering through this problem for quite a while now and I’ve isolated the issue that I run into. I’m not exactly sure why this happens and it’s not consistent but here is what I notice.

    I was getting null reference exceptions in javascript when trying to register an actionscript method for javascript, when i run a debugger (visual studio), I see this error..

    __flash__addCallback(flashobj, “callForceSubmit”);

    Where flashobj is the ID that im using in the flash object constructor. I’m using an init method on window.onload that sets a variable like this..

    var fl = document.getElementById(“flashobj”);

    the problem is that the flashobj in __flash__addCallback does not exist. If i change the variable(fl) that holds the instance of the flash embed/object to the name of the id for the FlashObject constructor, it will work.. so it would look like this..

    var flashobj = document.getElementById(“flashobj”); and now the __flash__addCallback(flashobj, “callForceSubmit”); method doesnt fail and externalinterface is successful.

    Note that this scenario is not consistent. I have some flash files set up with externalinterface calls both ways JS->AS and AS->JS with now problems. It appears that on any of the more elaborate files im working on (1000’s of lines of AS), it is more of a problem so im not able to isolate the issue.

    Hope this helps.. i’ve been thrashing with externalinterface issues for a while now and that appears to fix any problems.
    -CJ

  16. CJ,

    Is it possible you are already using the same Id of your Flash movie in the page? That’s probably the most common cause of that error. Post your FlashObject embed code here or a link to it (or even better yet, join the FlashObject mailing list and send the link there).

  17. Paul,

    Re: the ExpressInstall issues: I’ve fixed them – it was related to how Flash 8 publishes Fonts and Outlines/strokes on objects. Basically you have to convert all your fonts to device fonts and make all the outlines hairline (or remove them) and it will start working.

    I’ve updated the FlashObject zip file so it all works now as it should. I’ll be updating the FlashObject page soon with the details.

  18. I have a site where I’m using flashobject and modified suckerfish dropdowns on the same page. The problem is when I hover over a navigation item, the sub-nav drops down, but the flashobject is overlapping the menu so that is inaccessible. Does anyone know of a work around for this?

  19. David,

    This is always a problem whenever you use Flash on a page – it can be very tricky to get content to show over the top of the Flash movie.

    First thing you can try is to add a wmode parameter: fo.addParam(‘wmode’, ‘opaque’);

    But this may have issues in some browsers (usually Safari).

  20. The FLV Playback component controls do not appear when using flashobject 1.3 Videos are able to load but the playback controls wont come up. The Kimili WordPress plugin has the same issue and users over there have reported the same problem.

  21. There shouldn’t be any difference – are there variables you need to pass into the Flash movie?

    Is there an example somewhere I can look at?

  22. Hi,
    I am happily using your great flash detection method. Many thanks for sharing this with us!
    But I need the Flash content displayed full-full page – so it’s essential that I have scroll-bars on the HTML page in case any user is using a small display.
    So please: Does anyone have any idea how to have a full-screen flash site using FlashObject – but still have the scrollbars appear in the HTML page when required?
    Any ideas or help would be much appreciated!
    Thanks.
    PS – I have tried a number of variations of “overflow:’ in the CSS.

  23. The extra double quote is still in 1.3c, FYI.

    Check Line 75 (not in the source file? Is ShrinkSafe adding it?)


    _1c+=""";

    should be

    _1c+="";

    no?

    Fantastic work though Geoff. Much appreciated.

  24. Strange… I swear I removed that ;)

    I have really removed it now, and am updating the zip file/examples as we speak :)

    Thanks.

  25. I am trying to use expressinstall. I am using flash 8 and actionscipt 1. Whenever I go to export my movie to swf, I get the following errors: **Error** /Library/WebServer/Documents/stlsm/images/expressinstall.as: Line 1: ‘{‘ expected
    var ExpressInstall = function():Void {

    **Error** /Library/WebServer/Documents/stlsm/images/expressinstall.as: Line 4: Unexpected ‘}’ encountered
    }

    Total ActionScript Errors: 2 Reported Errors: 2
    Has anyone else seen this?

  26. I don’t get any errors when I compile it – have you changed the .as file?

    Maybe try downloading the zip again and using the file fresh from there?

  27. Hi Geoff
    Thanks a million for spending so much time and effort in creating and maintaining this highly useful script, and for maintaining the effort in supporting it. I’m unfortunately encountering a problem with IE 6 on Windows, which I’ve traced to line 102 of flashobject.js

    for(var i=3;axo!=null;i++){

    It’s reporting ‘null’ is Null or not an object. Any ideas?

  28. … and in true development style, I find the problem immediately after posting :-/ This error occurs if the target element (to be replaced) isn’t there. D’OH!

  29. Just one further question: would it theoretically be useful to create the flash object as a DOM element, and then replace the content of the target DOM element with that, rather than replacing the innerHTML? Re-coding, I know, but are there advantages? I only asked as I was interested in checking the cleanliness of my own page using the DOM inspector in Firefox, and noted that the wasn’t in the page structure…

  30. Well, in Firefox, you would get an Embed tag in the dom inspector. I have tried (twice now) to create a version of FlashObject that uses DOM methods to create the embed tags, but both times I have run into issues with different browsers that makes it much more complicated to do so. Safari has issues with some aspects of it, Opera has even more issues with it. So it’s just not practical right now because of how they all handle plugins differently. It ended up being a big hack to get all the individual browsers to work correctly.

    Also there isn’t a demand right now for DOM scripts because nobody is using XHTML 1.1 in the correct way other than a few *very* nerdy people ;) And those nerdy people usually don’t use nor want Flash content anyway.

    In the future it’s definitely the way I’d like to go, but I have no plans at the moment to make it work using the DOM methods.

  31. I am having trouble getting the xpressinstall feature working, I am a complete flash newbie, and I am a little confused on how to “include” the actionscript into my .swf besides just pasting the code into the “actions” window. Part of the problem is when I try to open the included .fla file in Flash MX 2004 I get “unexpected error” and it won’t open. This also happens when I try to open the xpressinstall actionscript file.

    Any help would be greatly appreciated.

  32. You need Flash 8 to open the .fla. ExpressInstall is for upgrading people to Flash 8 (or higher) when new versions come out, so if your content isn’t Flash 8, then there is no reason to use ExpressInstall to upgrade them.

  33. Is the Flash version detection broken in this last release or am I missing something?

    We’ve had many responses from people with Flash 7 who were served the Flash 8 content even though flashobject was passed “8” as required version. When I test this with Flash 8 by setting the required version to “10” it will still just go ahead and embed the Flash content instead of displaying the alternate content. Any input is appreciated.

  34. Are you using it with the ExpressInstall options? Double check to make sure that you don’t have the extra ‘true’ on the end of the constructor.

    If that doesn’t fix it, post some links to the FlashObject mailing list.

  35. What if my content is Flash 7, and I want my users browsing with Flash 6 to be upgraded to 8 so they can view my content?

  36. You could do that. In that case I recommend downloading the 30 day Flash 8 trial, or using some other free compiler like MTASC to create your Flash movies.

    Also keep in mind that most users will already have the Flash 7 plugin, so the percentage of Flash 6 users who have the version required for ExpressInstall will probably be very small and may not be worth the trouble.

  37. Thanks for the help Geoff. Great script by the way, I am using it for its basic function and it is working well. Is there any way to find the percentages of people still using Flash 6. How old is Flash 6?

    Just trying to decide if it is worth it to cater to people using Flash 6.

  38. Well I probably won’t bother then. Thanks for finding those stats for me. I guess my only other worry is people that are browsing without Javscript enabled but do have Flash 7+ and they get sent to my alternate content. I guess that is me just being paranoid.

    Thanks again for helping me out, I appreciate it, and keep up the good work.

  39. For that case, you can use <noscript> tags to show custom content for people without Javascript (i.e. “You must enable Javascript to view this content”)

Comments are closed.