Giter Club home page Giter Club logo

swfobject's Introduction

SWFObject

SWFObject is a free, open-source tool for embedding swf content in websites.

This GitHub edition of SWFObject is our 2.3 beta. The current release – 2.2 – is still available for download at code.google.com/p/swfobject/

When 2.3 is made official, we plan to make this GitHub site SWFObject’s permanent home.

Since SWFObject 2.3 is in beta, it could very likely have bugs. Please test throughly by visiting testsuite.learnswfobject.com/2.3b/ and/or by using the 2.3 beta code in your own projects. Please use the uncompressed version of SWFObject until we have ensured there are no bugs.

CHANGES

SWFObject 2.3 introduces many small changes under the hood (almost exclusively aimed at fixing bugs), but the public API is mostly unchanged and completely backwards compatible with SWFObject 2.2. The only two significant changes to the API:

  1. You may now pass an element as an argument in embedSWF (in place of an ID)

  2. You may now use integers in place of number strings in embedSWF (e.g. 9 instead of “9”).

Example:

OLD:

swfobject.embedSWF("myContent.swf", "my-target-element", "300", "120", "10.0.0");

NEW:

var el = document.getElementById("my-target-element");
swfobject.embedSWF("myContent.swf", el, 300, 120, 10);

Another significant change: SWFObject’s approach to dynamic embedding in Internet Explorer has been updated to use a more W3C-friendly way of creating the <object>. Because this is Internet Explorer, a few hacks were required, but the end result is code generated by W3C techniques (document.createElement). This means, among other things, that nodes generated for XHTML documents should properly self close:

OLD:

<object><param></object>

NEW:

<object><param /></object>

Similarly, since the <param> elements are all generated using the same W3C techniques, encoding flashvars should be less troublesome. Developers will no longer need to create separate flashvars encoding workflows for IE and non-IE browsers.

swfobject's People

Contributors

jhiswin avatar pipwerks avatar t-ashula avatar tensafefrogs avatar tersmitten avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.