Skip to content

Instantly share code, notes, and snippets.

@darkhelmet
Created November 14, 2009 02:21

Revisions

  1. darkhelmet renamed this gist Mar 24, 2010. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. darkhelmet revised this gist Mar 24, 2010. 1 changed file with 0 additions and 0 deletions.
    Empty file removed gistfile1.txt
    Empty file.
  3. darkhelmet revised this gist Mar 24, 2010. 1 changed file with 0 additions and 0 deletions.
    Empty file added gistfile1.txt
    Empty file.
  4. darkhelmet renamed this gist Mar 24, 2010. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. darkhelmet created this gist Nov 14, 2009.
    17 changes: 17 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    (function($) {
    $.fn.swfembed = function(movie, width, height) {
    this.each(function() {
    scale = 600 / width;
    w = '600px';
    h = (height * scale) + 'px';
    swfobject.embedSWF(movie, this.id, w, h, '9.0.124', '/swf/expressInstall.swf', null, { wmode: 'opaque', allowFullscreen: true });
    });
    }
    })(jQuery);

    $(document).ready(function() {
    $('.swfembed').each(function() {
    t = $(this);
    $(this).swfembed(t.attr('movie'), parseInt(t.attr('mwidth')), parseInt(t.attr('mheight')));
    });
    });