Why don’t you use FlashObject?

I’m working on the next round of updates for FlashObject, and I’d like to get some feedback from people on what I can improve. Do you need better documentation? Support for more browsers? What is keeping you from using it in all your Flash projects?

36 thoughts on “Why don’t you use FlashObject?

  1. I do use it whenever I’m creating a site that tries to be compliant and features flash movies – my only desire for solutions like this is that they be as light weight as possible, often developers become engrossed in adding al the features that somebody might need sometime in their life that they lose sight of keeping the code lean and slick – So my aim would be that you create the code with the minimum of features, but allow a method for adding all the extra params – I think you pretty much do this already tho, but as you are aware there are many params that can be added that are rarely used, these needn’t be built in as long as there is a method that handles creating custom params. The code would also do well to be packed using something like Dean Edwards JS Packer. Also if you were to create extensions for Dreamweaver and Templates for Flash then that would would boost uptake of flashObject – especially if you get them onto MM Exchange too. If you use Dreamweaver it is so easy to add flash to a page using the built in toolbar button, if you could replicate this functionality using your flashObject then this would be useful. I’m sure other applications have similar extensible interfaces so it may be worth looking into that – especially some of the freeware editors who would probably love to have your code built in and distributed with the intstall. Apart from the use of JS there is no reason not to use flashObject, I personally have no problem with JS, but some people still believe that the web should work without it, I agree in part, but at the same time I see most people have it enabled and it provides necessary functionality that the browser vendors and the specs don’t quite do adequately. JS is however seeing it’s ‘second coming’ and for the foreseeable future it will be in fashion.

  2. I also use the FlashObject for anything Flash related on the web. So far, I haven’t run into any problems or a situation that needs a tweak, but I’m eager to see what you have up your sleeves.

  3. I think some documentation on why using FlashObject is preferable to the Macromedia embed methods would help ‘sell’ it. People need a good reason to switch from a method they know.

  4. Jon,

    The guys over at CommunityMX have created a Dreamweaver extension for it… They charge for it if you are not a member, but it’s not too bad, only $15.

    I’ve also thought about the js packer app… But the script is already so small (12kb), I’m not sure it’s really needed. Anyone think that 12kb is too big?

    Thanks for all the other feedback so far.

  5. I’d like to see support for the wmode parameter for transparency.

    It’s also useful when you want to overlay HTML on opaque flash elements. By explicitly setting wmode to opaque, you can avoid an instance where flash is always on top.

  6. It already supports every parameter possible…

    Just use fo.addParam("<param>", "<value>");

    So for setting wmode to transparent, you would do:

    fo.addParam("wmode", "transparent");

    We have used that parameter a few times: on cosmogirl.com and on sleepfoundation.com.

  7. I’m using FlashObject for all our projects – it made my code look much nicer and I didn’t have any problems using it so far.

    One thing that could be optimised a tiny bit is the use of many flash movies on one page, i.e. it could remember having detected Flash on the same page before. Alternatively a Param for telling the FlashObject not to do the detection would help.

  8. Cool…

    There is already a param for skipping detection. Just add ?detectflash=false to any page with a FlashObject movie on it and the detection will be skipped for all movies on that page. If you wanted to embed your movie so that the detection never happens, you could just require Flash player version 0 and it would always write the movie to the page.

  9. I’ve been meaning to give this a try for quite some time and was very excited when I finally got a little extra time to sit down and do a bit of experimentation. Unfortunately, what I found was the script seems to fail. Using IE 6 on Windows XP, I disabled the Flash plugin with a quick and simple utility I found here: http://www.nirsoft.net/utils/tflash2.html. After that, when viewing the 2 example pages provided, I get nothing – that is, just a small box with a little red “x” indicating I don’t have the correct plugin installed to view the page. Really, I could get the same using the default Macromedia publish settings and no detection script (which, I’m embarrassed to admit, is what I normally do). I’m sure this script works great in some instances, but unless it’s working in all, it doesn’t seem worth the extra effort.

  10. Devon,

    The reason it fails is because the way the detection works (in Windows systems) is it checks the system for registered ActiveX controls. In your case, the control is registered, so the browser thinks it can display the Flash content correctly, but when it tries to load the control, it failes because your utility has disabled it. The same thing happens when you use Safari and have the ‘disable Flash’ checkbox checked. In my opinion it is a bug in Safari, and a very poorly written utility that disables the ActiveX control but doesn’t tell the system it is disabling it.

    If you uninstall the Flash player using Macromedia’s uninstaller then the FlashObject script will work perfectly.

  11. Geoff,

    Thank you for taking the time for the explanation. That makes sense. I knew it had to be something minor, as I’ve heard nothing but good things about your Flash Object creation. I’ll continue trying this out.

  12. I’m a total newbie flash programmer trying to get a good fallback generator for flash. When I try your sample pages on my machine that only has Flash 5.0 installed, it keeps trying and trying to load the page forever. It never does load the flash, but it never does show the alternate content either.

    It has the same problem when I try to get it to work on my own site: http://www.bigbrainz.com/indexTest.php.

  13. That sounds odd. Did you use the Macromedia uninstaller to remove the current Flash player from your system before you installed the Flash player 5?

    If you did, then what browser versions / OS are you using?

  14. Geoff,

    After resetting my computer, your own example files worked fine, but mine wouldn’t. After messing around a bit, I found that it had something to do with the version of the flashobject.js file. Version 1.2 is fine, but it was version 1.2.1 that was causing me problems. With that version, neither of my test machines were getting any of the non-flash content.

  15. i find that i have several visitors (at least 3 among friends and fam) that need to bypass the flash version detection (using FO with Dominey’s SlideShowProw) in FO. i’m hesitant to use it on a client site for that reason. SSP requires flash 7 and bypassing the detection makes it work just fine for the users that FO isn’t working for. one test user reports IE6+ and a fresh version of flash, but they still get stopped.

  16. I love your script, it works very well!

    I’m having a problem with puttin layers on top of my flash movie with CSS. I set the wmode to “transparent”, but Safri still doesn’t recognize it correctly. so, when I hover over links I’ve placed in the layer above the flash file, all the content above the movie flashes, Check it out: http://www.banyantreepartners.com Any ideas? Thanks!

    -Nate Morris

  17. Safari has issues with wmode transparent – first you must have Flash player 7 or higher installed for it to even start to work, then you have other issues where placing content over the Flash movie will not work, and the Flash movie will snap to the top when it shouldn’t.

    As far as I know there is no way to fix these issues.

  18. So am I correct in understanding that there’s really no way to put DHTML content on top of Flash that works across IE, Firefox, and Safari?

    And a follow-up question: Is there a way to put one Flash object on top of another that is cross-browser friendly?

  19. As of right now, it’s not really possible in all those browsers. There are tricks you can do like swapping out your Flash content for a static image, but that might not look too great.

    layering Flash works the same way… it will be tricky to keep one on top of the other, but it would depend on the circumstances. You might be able to get it working.

  20. I’m about to integrate this javascript class, and a few other javascript classes(to replace activex controls) in all of my sites.

    Thank you for providing this excellent resource.

  21. I’m sure this has been covered somewhere, but I’m unable to find it. I’ve setup the script and it works wonderfully. the only issue I’m running into is that all my flash objects now have black borders around them. Normally I wouldn’t mind, but where I’m using fo.addParam("wmode", "transparent"); in the script, the border breaks up the continuity of the page. I checked the macromedia site but didnt see any options referencing borders.

  22. As far as FlashObject goes, it does, but in general using wmode=transparent can have issues in some.

    Depending on the Flash Player version and browser version/type you can get diffrent results.

  23. Geoff,

    I am loving this whole new world of Flash compliancy you’ve got going here! I really dig it. I am replacing all the Flash objects in all my companies websites with this new script and code. Thanks again.

    On to the issue I have: when I use masking in a Flash movie to set the border of the movie to specific shape (say, a circle or a rounded rectangle) and then layer it over a image background that matches the shape of the mask, I can’t seem to get the transparency to work properly. I have the fo.addParam(“wmode”, “transparent”); code added in the correct spot, but the masking seems to not work. It leaves the background color mentioned in the earlier part of the code hanging out around the edges instead of just making the Flash movie appear in the shape I dictated within the movie itself. Below is a copy of the code:

    <script type="text/javascript">
    var fo = new FlashObject("images/carwindow.swf", "mymovie", "430", "280", "8", "#FFFFFF");
    fo.write("carwindow");
    fo.addParam("quality", "high");
    fo.addParam("wmode", "transparent");
    </script>

    Now, the issue is with the first line after the size parameters. In the quotes bracket where you have to define a color (in this case, “#FFFFFF”), that color appears in a perfect square around my movie’s edges, despite the masking effect used. Make sense?

    What I’m wondering is, is there a color parameter that can replace the typical hex code in that first line, or do I need to omit the color tags altogether, or what?

    This is very important to a current project I’m working on, so a prompt response would be appreciated. Thanks again for the tremendous code.

  24. Can you please write that in the context of the code so I know what you’re referencing? Does it go in the script I included above, or in the .js file, or where? Thanks again for the help.

  25. Change your code to this:


    var fo = new FlashObject("images/carwindow.swf", "mymovie", "430", "280", "8", "#FFFFFF");
    fo.addParam("quality", "high");
    fo.addParam("wmode", "transparent");
    fo.write("carwindow");

  26. TREMENDOUS! That was the only issue I had, and honestly, I thought I looked over every document in the books to find the answer to that question. If you are looking for ideas for improvement, it would be to more tightly document and centralize all the Q & A sessions on FlashObject. With IE and this new change, I’m sure more and more people will be flocking here each day with the same questions. A very clear place to e-mail/iteract/ask questions to you would be great, too…I went to many a thread that said “comments closed” and didn’t answer the above question.

    Anyways, thanks again for the great solution. I wish I’d only known about it sooner! ; )

  27. Thanks for the feedback. I’ll just take this change to hype the SWFObject mailing list one more time :). It’s full of people who use SWFObject every day, and know it very well, and can probably answer your questions faster than I will on here or by my direct e-mail address.

    The more centralized documentation/FAQ is something else I’d like to work on as well. Thanks for the feedback.

Comments are closed.