Alternatives to swfobject for embedding flashplayer

对着背影说爱祢 提交于 2020-01-13 13:52:31

问题


Does anybody know if there's a better alternative to swfobject? I actually like swfobject, I just wanted to hear if anybody found something better. Or maybe it is the best way.

If you do not know swfobject you can find it here:

http://code.google.com/p/swfobject/


回答1:


It is the best way I know of, and I have never had a problem with it. Note that you cannot put JS in embed code for posting on some social networking sites such as Facebook. In those cases you will need to use the usual object and embed tags.




回答2:


You can try ActiveContent, which is Adobe's solution for embedding flash. It's the default for flex builder, and (I believe) CS4.

You can find the source to this in the flex builder directory;

 $FLEX_BUILDER_LOCATION\sdks\3.3.0\templates\client-side-detection

Generally, people prefer swfobject because of it's simplicity. But activecontent is a field-tested solution.




回答3:


There are many alternatives to SWFObject, including SWF embedding code that ships with some popular JS frameworks, but none are as bulletproof as SWFObject.

Adobe is in the process of adopting SWFObject 2.x for most of its publishing products (SWFObject will replace Adobe's ActiveContent JavaScript-based solution).

BTW, If you use SWFObject's static publishing approach, your SWF will work without JavaScript being enabled. It simply won't have access to Adobe's ExpressInstall utility. See http://code.google.com/p/swfobject/wiki/documentation#Should_I_use_the_static_or_dynamic_publishing_method?

You don't even need to download SWFObject if you use Google's Ajax API repository :)




回答4:


SWFObject 2. The best way to get your flash movie seen by as many people as possible. (Except those with JavaScript turned off!)




回答5:


There's a nice "wrapper" for swfobject called "EasySWF". They're using swfobject, but just made it much easier to understand/implement.

From their documentation adding an SWF is as easy as:

easyswf({swf: "path/to/the.swf", width:400, height:100});

Here's the address:

http://www.gieson.com/Library/projects/utilities/easyswf/

Looks like they're using it throughout their site as well?



来源:https://stackoverflow.com/questions/757883/alternatives-to-swfobject-for-embedding-flashplayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!