Skip to content

jquery.flash v1.3.1 – Squashing IE-related bugs.

by Qard on January 2nd, 2010

If you downloaded v1.3 of jquery.flash I would recommend switching to this one. There has been no functionality changes, so it should just be drop-in. It fixes a minor bug I added when I switched to using indexOf() for iterating through attributes and parameters…apparently IE doesn’t support it. >.>

That’s fixed now and I did a few minor structural changes to reduce the character count a little and make things ever so slightly speedier. I also created a fancy tutorial page type thing for it, which you can check out here.

Example

Downloads:
Minified – 2.03 KB
Non-Minified – 4.35 KB

Be Sociable, Share!
  • http://dtigraphics.net Jason Chandler

    Wondering if there’s another bugfix coming for IE. If I use JQuery 1.4.0, the flash plugin does not write out the PARAM values in the object, but only in IE

  • Qard

    I’ll try to have a look at that tonight. A warning though; jquery-flash is not tested at all with 1.4 yet, so it’s safest to assume it’s unsupported until I say otherwise.

  • Qard

    Well I’ve tried it in IE8 in normal mode and compatibility mode, both worked fine with 1.4.0 and 1.4.1. Are you using it with any other libraries? It could be some incompatibility issue. Do you have a link to an example of the implementation where I can look at the code?

  • Richard

    I’m trying this plugin out on a web site I’m building, and while it works perfectly on IE 8 and in standards-based browsers, on both IE 7 and 6 I’m just getting a plain white rectangle in place of the video player.

    (I’m using it with jQuery 1.4.1.)

    Any idea what’s going on?

    Thanks!

  • Qard

    Does IE report any errors? I don’t have easy access to older versions of IE at the moment, so any details I can get are very helpful.

  • Richard

    No errors at all, just a plain white rectangle. Maybe it’s not including the ‘movie’ parameter?

    If you want to test it yourself, you can get old versions of IE (as standalone programs) at http://finalbuilds.edskes.net/iecollection.htm . Gives you every major released version in IE’s history, though I only care about 6+ myself.

  • yoh

    Hi, does your jquery.flash handles caching problem in IE specifically IE 8? Here is a snippet of my code

    $(“#SlideShowDiv”).flash({
    width : 400,
    height : 300,
    src : slideshow.swf,
    flashvars : {ID: swfID_LVAR},
    classid : ‘clsid:D27CDB6E-AE6D-11cf-96B8-444553540000′,
    codebase : ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=’,
    pluginspace : ‘http://get.adobe.com/flashplayer’,
    version : ’9.0.24′
    });

    “slideshow.swf” is a slideshow i made using AS2.0 that gets image dynamically. as you can see, I have one flash variable w/c is “ID”, this variable is controlled by the user through a number of buttons. Basically when one button is clicked the the value of the variable would change and therefore affects my slideshow. This code works in Firefox but not in IE.

  • Qard

    No, it’s doesn’t do anything about caching. I don’t really think that’s within the scope of this project..

    I can’t seem to reproduce the white rectangle issue. I’ve now tested in IE 5.5, 6, 7 and 8 in normal and compatibility mode. IE 5.5 doesn’t quite work, but IE6 and newer seems to all work.

  • http://www.gregraven.org Greg Raven

    I haven’t tested it thoroughly on older browsers, but this seems to function nearly perfectly with jQuery 1.4.2. I say “nearly perfectly” because I had to specify the height and width of the SWFs I’m pulling in, but that’s trivial. Otherwise, it’s easy to configure, and it integrates beautifully with my other code. Thanks!

  • http://hire.chrisjlee.net chris

    is your plugin compatible in noConflict() mode?

  • Qard

    @Greg
    By that, do you mean it didn’t inherit the dimensions of the parent element? That’s it’s default behavior; it checks if specific dimensions have been supplied and, if not, will inherit the dimensions of the element it is replacing.

    @chris
    I’m not sure if it’s compatible with $.noConflict(). I haven’t had any use for that before, so I haven’t tried. I’ll have a look in the next few days to see what I can find out.

  • http://www.ussh.ro/ link directory free submit

    this seems to be more fixed

    http://jquery.lukelutman.com/plugins/flash/
    link directory free submit recently posted..Anunturi gratis-

  • Qard

    That plugin is pretty old…it doesn’t work with any version of jquery released in the last 2 years…or probably more.

  • Guest

    I don’t think this version has the fix for http vs https?

  • http://www.stephenbelanger.com Stephen Belanger

    No, there is nothing to detect protocols, as this library doesn’t assume absolute URLs. I may consider adding some code to transform relative URLs into absolute ones at some point in the future, but I am as yet undecided…I’m not sure if it really fits the scope of this project.

  • Guest

    It appears that the security error is caused not by the swf ulr, but by the urls http://get.adobe.com/flashplayer and/or http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab

  • http://www.stephenbelanger.com Stephen Belanger

    Hmm, I suppose that’s true. I wouldn’t have thought the pluginspace URL would cause a security error though, since it doesn’t actually download anything from there, it works more like a link; non-secured links work perfectly fine in https. I’ll see about doing an update for that soon.

  • Oren

    Hi,

    Is there a known issue with wmode?
    I’m trying to embed Youtube using jquery-flash + I have an absolute later which should go over the embedded Youtube.
    In FF/IE everything is perfectly Okay and I can see the wmode=transparent param.
    However, in Chrome (both in Linux / Windows) – the wmode doesn’t exist.

    This is the line I’m using to embed the flash:

    And this is the JS:
    $(‘#testing’).flash({src:’http://www.youtube.com/v/vPQvTgD2quQ’, width:180, height:100, allowfullscreen:’true’, allowscriptaccess:’always’, wmode:’transparent’, codebase:’https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,24′, flashvars:{}});

    Ideas?

  • http://webmasterymadesimple.com/ PaulCormier

    I’m successfully using your plugin to load multiple copies of the same swf (different IDs) on the same page. The problem I’m having is that the first swf instance loaded correctly checks the browser cache, but all subsequent instances of the swf on the same page DON’T check the cache and instead download from the server.

    Firebug reveals that the first instance has “If-Modified-Since” and “If-None-Match” request headers, but the subsequent requests to the exact same swf do not have those headers. All the other request headers (keep-alive, url, etc) are identical.

    I’m using v 1.3.2. Any ideas on how to fix this? The SWF is quite large, so it’s important that it pulls from the browser cache after the first load.

  • http://www.stephenbelanger.com Stephen Belanger

    Hmm. Good question. I’m not sure why it would be doing that, as the code doesn’t touch that stuff at all. It’s possibly because the code uses string concatenation rather than object construction and lets jquery deal with that. Perhaps it is generating an entirely new object for each and the browser thinks they are different for some reason. I’ll look into it, if I figure anything out I’ll make some changes and release a new version.

  • http://webmasterymadesimple.com/ PaulCormier

    Great thanks. Let me know if you need help trying/testing anything. The odd part is the first call has the “If-Modified-Since” header where the subsequent ones do not?!?

  • Uwe Jakobs

    Hi Stephen,

    thank you very much for this plugin. I’m using it for displaying Flash-Banners on a Typo3-Site. It’s working great!

    Nevertheless, I had some problems to create a proper count on Flash-Banner-Clicks. This is a general problem with the Flash-Technology, so the only chance you have is using an EVENT inside the surrounding Tag. Because each banner has to have an unique count, you will want to work with parameters to guarantee a valid identification.

    Therefore, I added an onmousedown-Event for the Object-Tag in your plugin-code. Now, it’s quite easy to call another javascript-function, that does the job (in my case, it’s an AJAX-driven MySQL-Insert).

    You may download the zipped files here, if you like:
    http://imageco.de/jquery.flash.zip

    HTML-Snippet to give you an idea what I’m talking about:

    ######## jquery.flash ########

    $(document).ready(
    function () {
    $(‘#add_’.$row["UID_PL"].”).flash(
    {
    ‘src’:”.$img_pfad.$row["file"].”,
    ‘id’: ‘flash_’.$row["UID_PL"].”,
    ‘onmousedown’: ‘javascript: bannerCount(‘.$row["UID_PL"].’)',
    ‘width’: ’160′,
    ‘height’: ’600′,
    ‘wmode’: ‘transparent’
    }
    );
    }
    );

    You need to install flash.’;

    ######## jquery.flash end ########

    I hope, my solution can help other people too.
    Please excuse my bad english, I’m still learning :)

    Cheers

    Uwe

  • http://webmasterymadesimple.com/ PaulCormier

    Any progress on this bug?

  • http://www.stephenbelanger.com Stephen Belanger

    Sorry, have been busy with other things. I looked at it a bit but couldn’t find anything. I might have some time to take another look at it this weekend. I wasn’t able to reproduce the bug in Chrome, so it’s possible that it is a Firefox issue.

  • http://webmasterymadesimple.com/ PaulCormier

    I did some more testing. It appears to be bug in FireFox. IE & Chrome do not exhibit this behavior. See: https://bugzilla.mozilla.org/show_bug.cgi?id=654241

  • http://www.stephenbelanger.com Stephen Belanger

    Good to know.

  • Justin

    Seemed to be having problems with transparent wmode in Chrome. I added “type” attribute with value set to “application/x-shockwave-flash” to non-ie output and all worked fine. 

  • Matthew Clemmons

    @Justin, great find right there.  If anyone is having layering issues with jquery.flash in Chrome, this is the solution.  As Justin points out, add “type” to “availparams” and set the “type” in your jQuery call.