jQuery.flash() 与混乱的默认 Flash Professional 代码

发布于 2024-10-05 13:30:25 字数 235 浏览 0 评论 0原文

如果我(很少)将Flash放到我开发的网站上,我总是会使用这个:

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

然而Flash给你的代码是一段可怕而混乱的代码。为什么5行代码= Flash默认的HTML嵌入代码。我认为使用 jQuery 版本没有任何缺点,对吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

合约呢 2024-10-12 13:30:25

您的意思是为什么使用 jQuery flash 插件比 Adob​​e 提供的代码更简单?因为它为您消除了复杂性。所有相同的事情仍然发生在您包含的脚本中,只是您看不到而已。

如果您只是简单地包含 jQuery 和 flash 插件来将 Flash 嵌入到页面上,那么您可能会下载比使用 Adob​​e 默认值或非基于 jQuery 的脚本(例如 SwfObject。但如果您已经在网站上使用 jQuery,那么可能不会有太大区别。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文