Fix for loading SWF in lightbox without width and height parameters in href
  • Here is the changed code to insert flash files without giving the extra href parameters.
    filename: jquery.prettyPhoto.js v2.5.6a, linenr. 269



    case 'flash':
    correctSizes = _fitToViewport(movie_width,movie_height); // Fit item to viewport

    flash_vars = images[setPosition];
    flash_vars = flash_vars.substring(images[setPosition].indexOf('flashvars') + 10,images[setPosition].length);

    filename = images[setPosition];
    /**
    * WarmStal 11-02-2009: fix for missing width/height (missing?)
    */
    pos = filename.indexOf('?');
    if(pos != -1){
    filename = filename.substring(0,pos);
    }
    toInject = settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);
    break;
  • I spent about 5 hours banging my head on the wall. The flash kept loading with a question mark and half of the file path. Your code fixed it.

    Thank you thank you thank you!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!