[文章作者:张宴 本文版本:v1.0 最后修改:2007.04.15 转载请注明出处:http://blog.zyan.cc]

  微软因为一项专利侵权案,更改了IE浏览器中的ActiveX控件,只要Windows自动更新安装了微软的KB912945补丁后(或者安装IE7后),凡是一个页面内使用<object>、<embed>或<applet>标签的活动内容都不会被自动激活,需要用户手动点击,因而flash控件也不能幸免。下图为腾讯首页的一个Flash,各大门户网站只有腾讯的Flash控件没有进行激活处理:

  点击在新窗口中浏览此图片

  目前只能通过修改网页来解决激活问题微软官方给出的自动激活方法是:使用<script type="text/javascript" src="abc.js"></script>的方式调用外部的JS文件,在JS文件中用使用docuemnt.write写<object>...</object>。注意:直接在页面上使用docuemnt.write写入是不能饶开激活限制的。


  我在自己的博客上采用了Unobtrusive Flash Objects (UFO)方案,首先在<head></head>中调用:
引用
<script type="text/javascript" src="http://www.zyan.cc/x/blog/200704/ufo.js"></script>

  然后在需要插入Flash的地方插入以下代码:
引用
<script type="text/javascript">var FO = { movie:"http://v.blog.sina.com.cn/swf/player.swf?vid=1783929&uid=1278987704&auto=0", width:"475", height:"447", majorversion:"8", build:"0", xi:"true", quality:"high", bgcolor:"#EAEFF0" };UFO.create(FO, "v20070325-1");</script><div id="v20070325-1"></div>

  注意:红色部分为flash文件地址。两个黄色标注的v20070325-1是随便设定的ID,两两对应,如果一个页面有多个Flash时,不同的Flash需要设定不同的两两对应ID。很多博客支持HTML代码,但提交文章时会在每行代码后加上<BR>换行符,导致Javascript代码出错,以上代码在浏览器中显示有三行,其实并没有换行,因而插在支持HTML的博客中不会出错。
  演示:http://blog.zyan.cc/read.php/217.htm


  还有一些公司、组织和个人提供了解决方案,列表如下:

  1、SWFObject: Javascript Flash Player detection and embed script(新浪、搜狐采用)
  网址:http://blog.deconcept.com/swfobject/

  2、Adobe公司:Active Content Update Article
  网址:http://www.adobe.com/devnet/activecontent/articles/devletter.html

  3、Unobtrusive Flash Objects (UFO)(本博客采用)
  网址:http://www.bobbyvandersluis.com/ufo/

  4、ObjectSwap: Bypassing the ActiveX Activation Issue in IE
  网址:http://www.sitepoint.com/article/activex-activation-issue-ie
  说明:ObjectSwap只需要在<head></head>中引入一个脚本。其逻辑是在页面加载完成后,重写一次标签来实现自动激活,页面中的flash依然是标准的HTML,不需要通过document.write写入。不过兼容性不太好。

  5、objectSwap_lite.js(淘宝网根据ObjectSwap修改的版本,比原版好用)
  说明:首先在<head></head>中引入以下脚本:
引用
<script type="text/javascript" src="http://www.taobao.com/home/js/objectSwap_lite.js?t=20070122" defer="defer"></script>

  接下来可以查看http://www.taobao.com的HTML原文件,查找“<object”,看看他们是怎么写的。


技术大类 » PHP/JS/Shell | 评论(17) | 引用(0) | 阅读(20416)
littlehz
2007-5-16 21:48
请问一下,用原来的<object>插入Flash文件,可以设置Flash透明显示<param name="WMode" value="Transparent" />,而用UFO方案该怎么让Flash透明方式显示呢?
louis vuitton uk Email Homepage
2011-11-22 17:34
This louis vuitton uk for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.You will easily notice the unfold zippers of this coach outlet store online. That is the decoration. There are some inside pockets for you as well. They are easy to match your clothes and to carry.Let us inspire your inner beauty with fine christian louboutin sale. Purse the elegance in bridal wedding. Enjoy the fashion.
coach factory outlet Email Homepage
2012-5-17 10:31
Today, following half a century, mentor leather-bases coach factory outlet continues to be the delicate craft of leather-based master is accountable for,Would you like to meet more friends, or go with the times? If yes, coach factory online is opening welcome doors to you.in the market you definitely can find various colorways that are designed in as well as the high quality that applied in. For most of you would like to come. So just come to our coach factory outlet online store to choose one.
louis vuitton sale Email Homepage
2012-5-17 10:32
Louis Vuitton belt at louis vuitton sale is one kind of fashion accessory with high cost performance among the Louis Vuitton accessories.Offering quality LV products with favorable prices, louis vuitton outlet store is at your service. Hurry up, or you can not seize the chance.in fact, louis vuitton is one of the most famous fashion design master.he opened the fist suitcase shop called after his name.
coach outlet online Email Homepage
2012-5-17 10:32
I heard of coach outlet online through the advertisement when I was shopping. And now I often brow the webpage and buy Coach bags online.It is a symbol regarding position not to mention nature.Here I would like to launch a excellent bags pertaining to business men.Which may be coach outlet store.coach outlet has always been simple,durable style features to win consumers.The products are more flexible,with easy bleaching,wear characteristics,and simply use a damp cloth.
coach outlet, Email Homepage
2012-5-17 10:32
Remember the coach outlet provide coach bags which won't be deteriorated into its overall styles by any means. It will maintain its looks, colors, and uniqueness for long time.coach outlet store online has been voted by Hour Detroit magazine readers as the Best of Detroit in their 12th annual readers'poll.Lots of women like which usually amount normally include a coach outlet online ,it provides coziness to many girls that don't even think it is a great bushel of great interest directly to them.
xujie777 Email
2012-5-18 15:24
We aim to make all our customers satisfy with our products. You will find a variety of Men's fashion louis vuitton uk, fashion Women's cheap Louis Vuitton bags in our store at affordable price.Thinking of interesting ways to cost a milestone birthday? louis vuitton online shop had one of the most distinctive distinctive celebrations.bakery along with living room operated by means of about three moment louis vuitton online Most effective Pastry Chef’s of the year Rammy Nominee Chef’s.
xujie777 Email
2012-5-18 15:24
The choices are likely to be basically countless seeing that louis vuitton outlet occurs with the help of completely new and also incredible concepts once in a while.Louis vuitton Wholesale Monogram Canvas HandbagsLouis Vuitton Collection Beach Handbags louis vuitton bags outlet Damier Canvas HandbagsLouis vuitton Mahina HandbagsLouis Vuitton Monogram Mini Lin HandbagsLouis Vuitton Monogram Multicolore HandbagsLouis vuitton Monogram Vernis HandbagsLouis Vuitton Wholesale Epi Leather HandbagsLouis Vuitton For Men HandbagsLouis Vuitton Damier Canvas WalletsLouis Vuitton Epi Leather WalletsLouis Vuitton Monogram Canvas WalletsLouis Vuitton Monogram Vernis WalleLouis Vuitton ShoesLouis Vuitton Men wallets.As the Authentic Louis Vuitton are so high-priced, so came the louis vuitton handbags outlet.
xujie777 Email
2012-5-18 15:24
coach outlet has become a popular shopping experience for consumers around the world, and a desirable distribution channel for manufacturer's and retailers.Getting your hands on coach outlet store online can be a hefty investment of hundreds of dollars.But do not despair,the Coach Outlet store could be the answer to your prayers.coach outlet online is your smart choice when you want to get the discount Coach accessory. You can find the exact Coach Bags and other accessory you want at a low price that's right for you. My dear friends, let the coach outlet online pave your way into the world of high fashion with their ultimate fashion factory.
xujie222
2012-5-21 10:49
Our online store offers you discounted Designer louis vuitton replica wallet at present. You could find them in desirable quality and price. If you don't mind high class louis vuitton uk, have a good time here.louis vuitton Store Online Handbags can also bring great accuracy as well as practical applicability and fashionable.Have you ever dreamed of being as charming as Madonna? Have you ever thought of becoming an envy of all your friends? If so, come to louis vuitton outlet.<br/>
xujie555
2012-5-21 13:15
coach factory outlet uses graceful accessories to match the classical logo of coach, which is the best combination of coach. The handmade coach products?can make you more charming and graceful.coach factory online provides people many coach goods. If you wish to snatch the coach handbag, then this best method is made for that you like for coach discount.coach factory outlet online is a fashion brand to ensure its quality. With designer coach shoulder bags, you will always attract people's attention. The bags will emphasize your personal style and taste.<br/>
xujie333
2012-5-21 14:37
coach outlet online Store guarantee that all the coach handbags offered are own high quality. In addition , all of them are sold at an unexpected low price.If you want to purchase, just visit their website.coach factory outlet is really sizzling kinds of shopping way for you. With the usage of the replica designer coach bags, you can surely be able to change your individual looks in a stunning manner.Coach bags on sale from the coach outlet are cheap or discount prices that you certainly will stand out from the crowd on your next camping trip!<br/>
coach88888888 Email
2012-8-13 17:25
Coach Factory Outlet offer excellent, elegant coach products in order to generate room for your new collections.They're purchased more quickly that you may at any time imagine.Most significantly, the coach designer purses of Coach Factory Online industry won't deteriorate your individual fashions at all. Rather they would immediately change your overall looks marvelously.I find it all very odd But this is no different than Coach Outlet Online any other company that has an outlet presence and really doesn’Coach Outlet Store t explain it to the customer.By the fashion, novel appearance, sophisticated technology, superior quality, Coach Outlet won domestic and international customers, their products exported to the Middle East, Southeast Asia and other regions.
coach88888888 Email
2012-8-13 17:30
good
Gucci Outlet Email Homepage
2012-8-16 23:22
with leading huge trend collaborations and wonderful new constructions Coach Handbags
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]