Question

If i (rarely) put Flash onto a website i develop i would always use this:

    $('#hello').flash({
    src: 'hello.swf',
    width: 320,
    height: 240
    });

Yet the code that Flash gives you is a horrible messy bit of code. Why is 5 lines of code = to Flash's default HTML embedding code. Am i right in thinking theres no disadvantage to use the jQuery version?

Was it helpful?

Solution

You mean why is it simpler to use the jQuery flash plugin than the Adobe-provided code? Because it wraps the complexity away for you. All the same stuff is still happening in the scripts you have included, you just don't see it.

If you're simply including jQuery and the flash plugin to just embed Flash on the page then you're likely downloading more script than say you would with Adobe's default or a not-jQuery-based one like SwfObject. But if you're already using jQuery on your site it probably won't make much difference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top