开发者

SWFObject vs AC_RunActiveContent

I need to consume a SWF produced by another developer, and he's using AC_RunActiveContent.js. In researching some stuff I found that there seems to be a more popular rendition; of course I am referring to SWFObject.

Having never used either before, I'm unsure which is "best" (开发者_JAVA技巧for me at least) and the SWFObject project page doesn't seem to delineate it's advantages over AC_RunActiveContent, at least not prominently.

So can anyone advise why I might prefer one over the other?

FWIW, this is primarily an IE-only intranet application.

EDIT: Also, it is expected that all users will have JS enabled, and should have Flash already (and will likely not have the ability to install the plugin themselves if it's not available), so do I even need such a library, or should I forego all of the trouble and simply embed the object directly in the page?


Both work fine and are equally compatible with most browsers. Both also will offer you to install Flash if it's not already installed, will ask you to update it if it's outdated, etc.

However, SWFObject is easier to maintain because the code is more compact and, unlike AC_RunActiveContent, it does not make you duplicate code all over the place. Go for SWFObject if you can - on the long run, it's worth knowing how to use it and it will save you some time.

Edit:

Even if all the users already have Flash, it's still simpler to use SWFObject. Without it, you'll have to write the embed and object tags and make sure that all the values are the same in both. If you change one value, you also need to update both tags.

The advantage of SWFObject is that you just have two or three lines that are easy to maintain. That being said, if your Flash is unlikely to ever change then why not use simple static HTML code - it really depends on your application.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜