开发者

jQuery.flash() vs messy default Flash Professional code

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜