flash player
Flash is a third party file type that may not be supported by your site visitor’s browsing software. It’s our job as Web developers and designers to ensure Flash movies are as accessible as possible and to provide relevant alternate content when required — as recommended by the W3C.
Flash是您的站点访问者的浏览软件可能不支持的第三方文件类型。 作为Web开发人员和设计人员,我们的工作是确保Flash电影尽可能地可访问,并在需要时提供相关的替代内容(这是W3C的建议)。
This is accomplished by employing Flash Player detection.
这是通过使用Flash Player检测来完成的。
This article will show you how to do just that. It will give a survey of current and future detection methods, and will put forward ideas and solutions to give your users seamless access to your Flash data — along with access to alternate content if their installed Player happens to be below the required version.
本文将向您展示如何做到这一点。 它将对当前和将来的检测方法进行调查,并提出一些想法和解决方案,以使您的用户无缝访问您的Flash数据-如果安装的Player恰好低于所需版本,则可以访问其他内容。
We will look at client side detection using Javascript and Microsoft’s VBScript for Internet Explorer on Windows, inbuilt version detection and markup based detection. Server side detection, available since Flash Player 6.0r65, will also be discussed.
我们将研究在Windows上使用Javascript和Microsoft Internet Explorer的VBScript进行客户端检测,内置版本检测和基于标记的检测。 从Flash Player 6.0r65开始可用的服务器端检测也将进行讨论。
I’ll round out the discussion with recommended detection techniques for different situations, and finally, I’ll provide some links to further reading on the methods discussed here.
我将使用针对不同情况的推荐检测技术来结束讨论,最后,我将提供一些链接以进一步阅读此处讨论的方法。
So let’s start!
因此,让我们开始吧!
Macromedia Flash content for the Web is encapsulated in an open file specification (SWF) and generated by proprietary authoring software such as Macromedia Flash MX, Adobe Livemotion, Swift3d and Swish.
Web的Macromedia Flash内容封装在一个开放文件规范(SWF)中,并由专有创作软件(例如Macromedia Flash MX,Adobe Livemotion,Swift3d和Swish)生成。
The SWF file format is non-native to browsers. That is, the graphical browsers we use, such as Mozilla, Safari, Opera and Internet Explorer cannot run SWF files on their own, as they can HTML, XML, GIF, JPG and PNG files. To handle SWF content, browsers require the free Macromedia Flash Player.
SWF文件格式不是浏览器的本机。 也就是说,我们使用的图形浏览器(例如Mozilla,Safari,Opera和Internet Explorer)无法单独运行SWF文件,因为它们可以运行HTML,XML,GIF,JPG和PNG文件。 要处理SWF内容,浏览器需要免费的Macromedia Flash Player。
Macromedia Flash Player handles the Shockwave Flash (SWF) and FutureSplash (SPL) file formats (FutureSplash was the precursor to Shockwave Flash). SWF is by far the more populous of the two so I’ll focus on this file format for the purposes of the article.
Macromedia Flash Player处理Shockwave Flash(SWF)和FutureSplash(SPL)文件格式(FutureSplash是Shockwave Flash的前身)。 到目前为止,SWF人口最多,因此在本文中我将重点介绍这种文件格式。
Flash Player has been a standard third party plugin for Web browsers since the late 1990s. Flash Player 3 was the first to have significant impact in the market, dot syntax was introduced in Flash Player 5, and the current Player, version 6, has the highest uptake rate of any Player released to date.
自1990年代后期以来,Flash Player一直是Web浏览器的标准第三方插件。 Flash Player 3是第一个在市场上产生重大影响的人,Flash Player 5中引入了点语法,而当前的Player版本6在迄今为止发布的所有Player中具有最高的使用率。
The Flash Player comes in many forms:
Flash Player有多种形式:
A standalone player 独立播放器 A plugin for browsers that support the Netscape Plugin API 适用于支持Netscape插件API的浏览器的插件 An ActiveX control for Internet Explorer browsers running on Windows operating systems Windows操作系统上运行的Internet Explorer浏览器的ActiveX控件As a matter of semantics, whenever I refer to the Flash Player throughout this tutorial I am referring to the downloadable plugin available at http://www.macromedia.com/go/getflashplayer — not the standalone Flash Player packaged with Macromedia Flash MX.
从语义上讲,每当在本教程中提及Flash Player时,都是指可从http://www.macromedia.com/go/getflashplayer获得的可下载插件,而不是Macromedia Flash MX附带的独立Flash Player。
Finally, all Flash Player versions incorporate minor releases. These are described throughout the article as, for instance, 6.0r65, meaning the 65th version of Flash Player 6. It’s a bit like WD40 (#40 being the attempt upon which they got the mix just right). Bet you didn’t know that!
最后,所有Flash Player版本都包含次要发行版。 在整个文章中,这些描述为例如6.0r65,即Flash Player 6的第65版。有点像WD40(#40是他们尝试正确混合的尝试)。 赌你不知道!
Why is Flash Player detection required?
为什么需要检测Flash Player?
As noted above, it’s because the SWF file is not handled natively by browsers that we need to employ some form of Flash Player detection to ensure that our SWF movies run smoothly, or not — as the case may be.
如上所述,这是因为SWF文件不是由浏览器本地处理的,因此我们需要采用某种形式的Flash Player检测,以确保我们的SWF电影(视情况而定)是否平稳运行。
Other reasons why we need to employ Flash Player detection are:
我们需要采用Flash Player检测的其他原因是:
Flash Player can be optionally installed and uninstalled. 可以选择安装和卸载Flash Player。 Some browsers have the ability to turn off plugins. 某些浏览器可以关闭插件。 ActionScript for the latest Player may not run in older Flash Players. This is most evident with the transition from Flash Player 4 slash syntax to Flash Player 5 dot syntax. Furthermore, Flash Player 6 classes such as LoadVars, callback functions and dynamic loading of JPEG images are not supported by older Players. 最新播放器的ActionScript可能无法在较早的Flash Player中运行。 从Flash Player 4斜杠语法到Flash Player 5点语法的过渡最明显。 此外,较早的Player不支持Flash Player 6类,例如LoadVars,回调函数和JPEG图像的动态加载。In my opinion, detection should be viewed as a way of ensuring:
我认为,检测应该被视为确保:
Smooth deployment of the movie for targeted versions 为目标版本顺利部署电影 Transparent identification of older versions and 透明识别旧版本和 Deployment of appropriate alternate content as per the W3C recommendation and a link to the Flash Player download page if required. The user should be provided with an option to upgrade if they wish. 根据W3C建议部署适当的替代内容,并根据需要链接到Flash Player下载页面。 如果愿意,应该为用户提供升级选项。Flash Player detection is not something that we should just slap onto the start of a Flash application or site as an afterthought. Poorly executed detection scenarios can present an insurmountable barrier to users who want to access Flash or alternate content.
事后考虑,我们不应只是将Flash Player检测放在Flash应用程序或站点的开头。 执行不佳的检测方案可能给想要访问Flash或替代内容的用户带来无法克服的障碍。
Remember above all else who your target audience is. A Flash site lacks in the accessibility and usability stakes if you prompt the user to
首先要记住您的目标受众是谁。 如果您提示用户执行以下操作,则Flash网站缺乏可访问性和可用性风险:
“click here if you have Flash Player 5 or greater”
“如果您具有Flash Player 5或更高版本,请单击此处”
A Web user shouldn’t have to decide this (and how many of them know what version they have installed?), regardless of whether we present the user with a plain text choice to alleviate potential accessibility issues. As developers, we should employ transparent Flash Player detection methods in all scenarios.
无论我们是否为用户提供纯文本选择来减轻潜在的可访问性问题,Web用户都不必决定这一点(其中多少人知道他们安装的版本?)。 作为开发人员,我们应该在所有情况下都采用透明的Flash Player检测方法。
The release of each new Flash Player typically offers attributes that aren’t found in previous versions (see the Flash Player 7 link at the end of this article). Features such as dynamic loading of Jpegs, the XML object, LoadVars and movie clip event handlers are just some of these.
每个新的Flash Player的发行版通常都提供以前版本中未提供的属性(请参阅本文结尾的Flash Player 7链接)。 动态加载Jpeg,XML对象,LoadVars和影片剪辑事件处理程序等功能只是其中的一部分。
Which version of the Flash Payer you should target will depend on your target audience. If your audience is Flash developers, it’s most likely they will have the very latest (or near to that) Player installed. On the flip side, the general public tends to be wary of downloading plugins and ActiveX controls — they tend to lag behind by a version. In this case, it might be good to use Flash Player 5 ActionScript to ensure maximum playability, with a view to upgrading as your user base grows more accepting of the technology.
您应定位的Flash Payer版本取决于您的目标受众。 如果您的受众是Flash开发人员,则很可能他们将安装最新(或接近该版本)的Player。 另一方面,公众倾向于对下载插件和ActiveX控件保持警惕-他们倾向于落后于某个版本。 在这种情况下,最好使用Flash Player 5 ActionScript来确保最大的可玩性,以随着用户群对技术的接受程度的提高而进行升级。
I generally don’t develop for version 4 or less, as at Flash Player 5 the transition to dot syntax took place and ActionScript grew immensely. Designers, though, may want to deploy for Flash Player 4 if they’re using simple motion tweens and very basic ActionScript. Bear in mind, though, that doing this will only increase the impact of your movie by a few percent.
我通常不为版本4或更低版本开发程序,因为在Flash Player 5中发生了向点语法的过渡,并且ActionScript急剧增长。 但是,如果设计人员使用简单的补间动画和非常基本的ActionScript,则可能希望为Flash Player 4进行部署。 但是请记住,这样做只会将电影的影响力提高百分之几。
At the time of writing, Flash Player 5 is by far the best version to target in order to reach the widest possible audience — although Flash Player 6 is growing at a considerable rate.
在撰写本文时,尽管Flash Player 6的增长速度可观,但Flash Player 5是迄今为止最有针对性的版本,可以吸引尽可能多的受众。
For the average Website visitor, being prompted to download and install anything on their machine so they can view content can be a hair-raising affair. Many site visitors are extremely wary of installing anything on their machine that they think could cause harm to it, and wisely so.
对于普通的网站访问者而言,系统会提示他们下载并在他们的计算机上安装任何内容,以便他们可以查看内容,这是一件令人毛骨悚然的事情。 许多站点访问者都非常警惕在他们的计算机上安装任何他们认为可能对其造成损害的东西,这是明智的做法。
It’s our job then to make the download and install a seamless, friendly process. What we want to avoid are any ActiveX pop-up windows or automatic redirections to Macromedia’s Flash Player download page. User experience tells us that these can turn visitors away in droves.
然后,我们的工作就是下载并安装一个无缝,友好的过程。 我们想要避免的是任何ActiveX弹出窗口或自动重定向到Macromedia的Flash Player下载页面。 用户体验告诉我们,这些可以大量吸引访问者。
An ActiveX warning: scary, isn’t it?
ActiveX警告:吓人,不是吗?
The Opera7 version — less intimidating, but still pretty uninformative for the non-Web savvy user (that ‘click’ button is the Flash movie).
Opera7版本—不那么吓人,但对于非Web精明的用户来说仍然毫无用处(“单击”按钮是Flash电影)。
What we want to achieve is a more sensible method of ensuring download of the Player if it is required — one that matches our site design and leaves the user in complete control of the download process.
我们想要实现的是一种更加合理的方法,以确保在需要时下载播放器-一种与我们的网站设计相匹配的方法,可让用户完全控制下载过程。
The first thing to do is employ some standards-compliant markup — which you’ll see in use throughout the code in this article. The advantage of writing markup like this is that it allows us to deploy a consistent download experience to all compliant browsers.
首先要做的是采用一些符合标准的标记-您将在本文的所有代码中看到这些标记。 这样编写标记的优点是,它使我们能够向所有兼容的浏览器部署一致的下载体验。
Here’s what we need to do:
这是我们需要做的:
Remove the Netscape specific Embed tags — Mozilla , Safari, IE5+Mac and Opera7 will still run your movie just fine with a few tweaks. 删除Netscape特定的Embed标签-Mozilla,Safari,IE5 + Mac和Opera7仍然可以通过一些调整很好地运行电影。 Change the codebase tag from the default Internet Explorer specific attribute to the W3C recommended attribute. 将代码库标记从默认的Internet Explorer特定属性更改为W3C推荐属性。 Place alternate, descriptive content within the object tags, after the optional param tags — as specified by the W3c recommendation. 按照W3c建议,在可选的param标签之后,将替代性描述性内容放置在object标签中。Note that, for users of Internet Explorer on Windows who have no Flash Player, changing the codebase attribute like this will cause their browser to do one of three things (depending on the user’s ActiveX security settings for “unsigned” controls):
请注意,对于没有Flash Player的Windows上的Internet Explorer用户,像这样更改代码库属性将导致其浏览器执行以下三种操作之一(取决于用户“未签名”控件的ActiveX安全设置):
Prompt: A pop-up window will appear with selections of Yes, No, and More Info.
提示:将显示一个弹出窗口,其中包含“是”,“否”和“更多信息”选项。
Enable: The browser will attempt to render the Flash object, fail, then display the alternate content as noted above.
启用 :浏览器将尝试渲染Flash对象,失败,然后显示上述替代内容。
Disable: The browser will fire a warning saying it can’t render the object due to security settings, then render the alternate content within the object tags.
禁用 :浏览器将发出警告,说由于安全设置而无法呈现对象,然后呈现对象标记内的替代内容。
These responses are occur as a result of the way IE for Windows supports the object tag, not the W3C recommendation, and it should be noted that in all cases alternate content would be displayed.
这些响应是由于IE for Windows支持对象标记而不是W3C建议所导致的,因此应注意,在所有情况下都将显示替代内容。
If you don’t want this to happen, I suggest you leave the codebase attribute as default — you will need to reference your movie absolutely in both the data attribute and the movie <param> tag when doing this, so that all browsers can find it.
如果您不希望发生这种情况,建议您将codebase属性保留为默认值-在执行此操作时,您需要同时在data属性和movie <param>标记中同时引用电影,以便所有浏览器都可以找到它。
On the flipside, now that the embed tag has been removed from the equation, Mozilla, Opera7 and other compliant browsers will render the alternate content within the object tags if they can’t run the designated file. No annoying jigsaw pieces or popup windows will appear for these browsers — just your specified alternate content.
另一方面,现在已从等式中删除了embed标签,如果Mozilla,Opera7和其他兼容的浏览器无法运行指定的文件,它们将在object标签中呈现替代内容。 这些浏览器不会显示烦人的拼图碎片或弹出窗口-仅显示您指定的替代内容。
So there we have it — a reasonably robust way to maintain control over the Flash Player download process — in a transparent fashion. Moving forward, we can employ this code in all the detection scenarios to be discussed, starting with the “Manyana” method.
因此,我们有了透明的方式-一种对Flash Player下载过程进行控制的合理可靠的方法。 展望未来,我们可以从“ Manyana”方法开始,在所有要讨论的检测场景中使用此代码。
This, the Cosmo Kramer of detection methods, is a reflection of the impact that Flash Player has in the market — it’s such a prevalent third party plugin that, when used correctly, this method will have a good success rate. Current statistics put the population of Web browsers capable of handling Flash Player 5 content (the best player to target for general sites) at about 96%. At the time of writing, Flash Player 6 has an audience of about 80% and growing.
这就是Cosmo Kramer的检测方法,反映了Flash Player在市场上的影响-它是一个如此流行的第三方插件,如果正确使用,此方法将具有良好的成功率。 当前的统计数据表明,能够处理Flash Player 5内容(针对一般站点的最佳播放器)的Web浏览器总数约为96%。 在撰写本文时,Flash Player 6的受众人数约为80%,并且还在不断增长。
This method is the simplest to employ of all those described here. Use the Publish Settings (File>Publish Settings…) in Macromedia Flash to generate the required markup, then make any changes to the (X)HTML — your title tags, head tags, and CSS file linkages, for instance. All that’s required now is to put the files on the Web server.
此方法是此处描述的所有方法中最简单的方法。 使用Macromedia Flash中的“发布设置”(“文件”>“发布设置”…)来生成所需的标记,然后对(X)HTML进行任何更改-例如,您的标题标签,头标签和CSS文件链接。 现在所需要做的就是将文件放在Web服务器上。
You can also employ Flash publishing templates tailored to your project, as discussed in the Online Flash Help files.
您还可以使用为项目量身定制的Flash发布模板,如在线Flash帮助文件中所述。
That’s the biggest advantage — ease of implementation.
这是最大的优势-易于实施。
Major disadvantages include that there are no control methods in place to assist a site visitor when something inevitably goes wrong, and the fact that we’re assuming that most site visitors will be using Flash Player 5 and above. Things can go wrong if you serve Flash Player 6 content, for instance, to Flash Player 3, and there’s no support structure in place for the user. It’s good programming practice to ensure that we have appropriate fallback methods when something does go wrong, which means this is not the best method to implement for a general audience.
主要缺点包括:当不可避免地出现问题时,没有适当的控制方法来协助站点访问者;以及我们假设大多数站点访问者将使用Flash Player 5及更高版本。 例如,如果将Flash Player 6内容提供给Flash Player 3,则事情可能会出错,并且用户没有适当的支持结构。 最好的编程习惯是在出现问题时确保使用适当的后备方法,这对于一般读者而言并不是最佳方法。
Code example
代码示例
Below is the markup described in the section “Handling the Flash Player download”. The browser will attempt to run the file, or display the alternate content if it can’t.
以下是“处理Flash Player下载”部分中描述的标记。 浏览器将尝试运行该文件,或者如果无法显示则显示替代内容。
Note that there is no version detection inherent in this method.
请注意,此方法没有固有的版本检测。
<object data="manyana.swf" type="application/x-shockwave-flash" codebase="http://www.example.com/" width="550" height="400"> <param name="movie" value="manyana.swf" /> <param name="menu" value="false" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ededed" /> <p> Alternate descriptive content can go here, plus a link to the Flash Player download page for the user to optionally activate. <br /> This text will be rendered if the user-agent cannot render the file specified in the object tag. </p> </object>When should this method be employed?
什么时候应该采用这种方法?
When you know accurately what Flash Player version is installed on your users’ computers. Examples include:
当您准确了解用户计算机上安装了哪个Flash Player版本时。 示例包括:
Intranets with standardised settings. 具有标准化设置的内联网。 Sites for active Flash developers, who will generally have Flash Player 5 or later installed. 活跃的Flash开发人员的站点,通常将安装Flash Player 5或更高版本。 When you are employing simple animations that are Flash Player 2 compatible. 当您使用与Flash Player 2兼容的简单动画时。When should this method be avoided?
什么时候应该避免这种方法?
When you are building a site for an anonymous audience with unknown Flash Player versions — basically anything on the Web for the general public. 当您为具有未知Flash Player版本的匿名受众构建网站时-基本上是网络上面向公众的所有内容。 When you are serving version-specific Flash content. 提供特定于版本的Flash内容时。Of course, you can use this markup just as well when employing client side scripting detection…
当然,在使用客户端脚本检测时,您也可以使用此标记…
This method is the most widely used among the development community. It involves employing client side scripts to check for Flash Player version information, then uses conditionals (if…else) to determine what to do based on the results that are returned.
此方法是开发社区中使用最广泛的方法。 它涉及使用客户端脚本来检查Flash Player版本信息,然后使用条件(如果…其他)来基于返回的结果确定要执行的操作。
To employ client side scripting, we have to know how the Player is installed and handled by different browsers and operating systems.
要使用客户端脚本,我们必须知道如何通过不同的浏览器和操作系统安装和处理Player。
All browsers, apart from Internet Explorer 5, 5.5 and 6 for Windows, handle the Player using the Netscape Plugin API. This means that once the Player is installed, version information is available to scripts via the Javascript Navigator.plugins array.
除适用于Windows的Internet Explorer 5、5.5和6外,所有浏览器均使用Netscape插件API处理播放器。 这意味着一旦安装了Player,就可以通过Javascript Navigator.plugins数组向脚本提供版本信息。
As with most things on the Web, the Internet Explorer versions noted above handle things differently. These browsers support Flash using Microsoft’s ActiveX technology and do not support the Navigator.plugins array. To detect version information in these situations, Microsoft’s own scripting language VBScript needs to be employed.
与Web上的大多数事物一样,上述Internet Explorer版本对事物的处理方式也有所不同。 这些浏览器使用Microsoft的ActiveX技术支持Flash,不支持Navigator.plugins数组。 要在这些情况下检测版本信息,需要使用Microsoft自己的脚本语言VBScript。
Luckily for us, Netscape-compatible browsers such as Mozilla, Netscape 7, Internet Explorer 5 for the Mac, Safari, Opera and Netscape Navigator 4 ignore VBScript entirely, and we can use this to our advantage when developing client side detection techniques.
幸运的是,与Netscape兼容的浏览器(例如Mozilla,Netscape 7,用于Mac的Internet Explorer 5,Safari,Opera和Netscape Navigator 4)完全忽略了VBScript,在开发客户端检测技术时,我们可以利用它来发挥我们的优势。
Code example
代码示例
Below is script that checks for Flash Player 6 on the user’s machine. If a version that’s lower than this is detected, or no version is detected, alternate, descriptive content is displayed — as per the W3C recommendation. Note that the script tags are XHTML compliant.
下面是检查用户计算机上Flash Player 6的脚本。 如果检测到低于此版本的版本,或者未检测到任何版本,则显示替代性的描述性内容-根据W3C建议。 请注意,脚本标记符合XHTML。
<script type="text/vbscript"> <!-- //check for Flash Player X //script for IE on Win32 systems on error resume next //set a variable to hold the detection result Dim checkForFlash6 //assign a boolean value checkForFlash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) //note here that if the object is demoted to ShockwaveFlash.ShockwaveFlash.5 or less, checkForFlash6 will still return true //this is ok as Flash Player 6 can run previous version content. //change 6 to 7 and you will see the alternate content (if 7 is not installed). //check that Shockwave Flash Plugin 6 is available //if false display alternate content, if true show object tag //quotes need to be doubled in vbscript in order for IE to render them in markup. if checkForFlash6 = true then document.write("<object data=""index.swf"" type=""application/x-shockwave-flash"" codebase=""http://www.example.com/"" width=""550"" height=""400""><param name=""movie"" value=""index.swf"" /><param name=""menu"" value=""false"" /><param name=""quality"" value=""high"" /><param name=""bgcolor"" value=""#ededed"" /></object>") else document.write("Alternate descriptive content can go here, plus a link to the Flash Player download page for the user to optionally activate.<br />This text will be rendered if the user-agent cannot render the file specified in the object tag.") end If --> </script> <script type="text/javascript"> <!-- //check for Flash Player X //check the navigator.plugins array exists, IE for Windows will fail on this. if(navigator.plugins.length) { //some variables //a counter var i; var xhtmlContent = "<object data="index.swf" type="application/x-shockwave-flash" codebase="http://www.example.com/" width="550" height="400"><param name="movie" value="index.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ededed" /></object>"; var alternateContent = "Alternate descriptive content can go here, plus a link to the Flash Player download page for the user to optionally activate.<br />This text will be rendered if the user-agent cannot render the file specified in the object tag."; //loop through all the plugins installed for (i=0; i < navigator.plugins.length; i++) { //put the plugin string in a variable var pluginIdent = navigator.plugins[i].description.split(" "); //The Flash Player identification string is ([] = the array index) [0]Shockwave [1]Flash [2]6.0 [3]r21 //if less than Flash Player 6 is detected, run this code. if(pluginIdent[0] == "Shockwave" && pluginIdent[1] == "Flash") { //set a toggle to show that some sort of Flash Player (of versions 1-5) was found var isSwfEnabled = true; //an array of the Flash version number (major.minor) var versionArray = pluginIdent[2].split("."); if(versionArray[0] < 6) { //show alternate content document.write(alternateContent); } else { //Flash Player 6 or greater has been found, roll out the <object> tag. document.write(xhtmlContent); } //need to break this loop as some browsers may have two versions installed //eg my Firebird release has r65 and r79 installed! break; }//end if pluginIdent }//end for //check if no Shockwave Flash was detected in the array (no Flash Player installed) if(!isSwfEnabled) { document.write(alternateContent); }//end if } --> </script>The code used above shows how alternate content can be deployed to a browser depending on the script results. It doesn’t utilise redirection, as I’m endeavouring to stick with the W3C recommendations in this article.
上面使用的代码显示了如何根据脚本结果将替代内容部署到浏览器。 它不利用重定向,因为我努力遵循本文中的W3C建议。
When should this detection method be employed?
什么时候应采用这种检测方法?
This method currently has the best chance of getting the exact version information for nearly all visitors to a page. As such, it’s most useful when you’re dealing with an anonymous audience:
当前,此方法最有可能为页面的几乎所有访问者获取确切的版本信息。 因此,当您与匿名受众打交道时,它是最有用的:
Pages for the general browsing public. 面向一般浏览公众的页面。 Intranet sites when Flash Player version is not known. 未知Flash Player版本的Intranet网站。 When you want to show alternate content based on what the script finds. 当您想根据脚本找到的内容显示替代内容时。When should this detection method be avoided?
什么时候应该避免这种检测方法?
If the site visitor does not have scripting enabled on their machine, this method will fail. Your decision to check whether scripting is enabled should be based on the knowledge that approximately 98% of users will have client side scripting running. Employ <noscript> tags to get around this and supply alternate content in those cases. 如果站点访问者的计算机上未启用脚本,则此方法将失败。 您决定是否启用脚本的决定应基于以下知识:大约98%的用户将运行客户端脚本。 在这些情况下,请使用<noscript>标记解决此问题并提供替代内容。 This method will not work in browsers that do not support client side scripting, such as Internet Explorer for the Mac versions 3 and 4. It’s time to be forward-compatible in this case, and if required a sniff can be performed for the small population of these browsers. 此方法在不支持客户端脚本的浏览器(例如Mac版本3和4的Internet Explorer)中不起作用。在这种情况下,是时候向前兼容了,如果需要,可以对少量用户执行嗅探这些浏览器中。 When you want your alternate content available for access by screen readers. 如果您希望其他内容可供屏幕阅读器访问。 When you don’t want to bloat pages or lock your content up in script, which leads us to a few lightweight detection methods. 当您不想在脚本中膨胀页面或锁定内容时,我们可以使用几种轻量级的检测方法。The object tag is the w3c recommended element for deploying any object within a markup based setting. “Object” in this sense means any non-text content, such as a Quicktime movie, a Java applet, an image, a Flash movie and so forth.
对象标记是w3c推荐的元素,用于在基于标记的设置中部署任何对象。 从这个意义上说,“对象”是指任何非文本内容,例如Quicktime电影,Java applet,图像,Flash电影等。
The recommendation states that if a browser has no way to deploy the content targeted by an Object tag, it should attempt to render the content held within the Object tag. If this is not possible, it should attempt to render the first available content it finds.
该建议指出,如果浏览器无法部署Object标签所针对的内容,则应尝试呈现Object标签中包含的内容。 如果不可能,则应尝试呈现找到的第一个可用内容。
This is an elegant and accessible way to handle Flash detection. For instance, the first object tag can link to the required Flash movie, the next nested object tag could attempt to deploy an image. If this were not possible, nested in this tag would be some descriptive text about the movie.
这是处理Flash检测的一种简便易用的方法。 例如,第一个对象标签可以链接到所需的Flash电影,下一个嵌套的对象标签可以尝试部署映像。 如果这不可能,则嵌套在该标签中的将是有关电影的一些描述性文字。
It’s a wonderfully simple method, based on the cascading ability of the Object tag. It is the W3C recommended way for user agents to handle objects, and works in all standards-compliant browsers. In respect to Flash detection, it’s an extension of the “manyana” method described at the start of this article.
基于Object标记的级联功能,这是一种非常简单的方法。 这是W3C建议的用户代理处理对象的方式,并且可以在所有符合标准的浏览器中使用。 关于Flash检测,它是本文开头介绍的“ manyana”方法的扩展。
Code example
代码示例
Below is the same valid XHTML described at the start of the article, with some additions:
以下是本文开头介绍的相同有效XHTML,并作了一些补充:
<object data="index.swf" type="application/x-shockwave-flash" codebase="http://<?=$_SERVER['HTTP_HOST']?>/sitepoint/flashdetection/testmovie/" width="550" height="400"> <param name="movie" value="http://<?=$_SERVER['HTTP_HOST']?>/sitepoint/flashdetection/testmovie/index.swf" /> <param name="menu" value="false" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ededed" /> <!-if no Flash Player present, render an image --> <object data="alternate.gif" type="image/gif" width="550" height="400"> <!-if images turned off, or a text only browser, render the text --> <p>Alternate descriptive content can go here, plus a link to the Flash Player download page for the user to optionally activate. <br /> This text will be rendered if the user-agent cannot render the Flash file or the GIF image. </p> </object> </object>Alas, elegant as this detection technique is, and even though object is an HTML4 recommendation from 1997, this solution seriously lacks browser support. Internet Explorer for Windows will attempt to render all object tags present in the code, so you will see a Flash movie and a GIF image if the Player is installed.
,这种检测技术非常棒,即使对象是1997年HTML4推荐,该解决方案也严重缺乏浏览器支持。 Windows的Internet Explorer将尝试呈现代码中存在的所有对象标签,因此,如果安装了播放器,您将看到Flash电影和GIF图像。
In XHTML2.0, object will be the method used to deploy images, so we should hopefully expect better browser support for this in the future. For now, though, it is but a coder’s dream.
在XHTML2.0中,对象将是用于部署图像的方法,因此我们希望将来会期望更好的浏览器支持。 但就目前而言,这只是编码人员的梦想。
When should this method be employed?
什么时候应该采用这种方法?
When you know that your site visitors are using standards-compliant browsers. For example, an Intranet with a Gecko-based browser used as default. 当您知道您的网站访问者正在使用符合标准的浏览器时。 例如,默认使用基于Gecko的浏览器的Intranet。When should this method be avoided?
什么时候应该避免这种方法?
When you’re dealing with an anonymous audience. 与匿名观众打交道时。 When your audience uses predominantly Internet Explorer for Windows as a Web browser. 当您的观众主要使用Internet Explorer for Windows作为Web浏览器时。Note that version detection within the markup is unavailable, so if this is important (for instance, if you use Flash Player 6 ActionScript), use inbuilt version detection within Flash:
请注意,标记中的版本检测不可用,因此,如果这很重要(例如,如果您使用Flash Player 6 ActionScript),则在Flash中使用内置的版本检测:
Flash ActionScript itself has three ways of detecting the version of the Flash Player on the client computer:
Flash ActionScript本身具有三种检测客户端计算机上Flash Player版本的方法:
$version (introduced in Flash Player 4 release 11) returns an operating system string together with version information (eg WIN 6,0,79,0)
$version (在Flash Player 4版本11中引入)返回操作系统字符串以及版本信息(例如WIN 6,0,79,0)
getVersion() (introduced in Flash Player 5) returns a similar string to $version
getVersion() (在Flash Player 5中引入)返回与$version类似的字符串。
System.capabilities.version (introduced in Flash Player 6) according to Macromedia returns a version number (eg 6.0) but in my testing it returns similar information to $version and getVersion();
根据Macromedia的System.capabilities.version(在Flash Player 6中引入)返回版本号(例如6.0),但是在我的测试中,它返回与$version和getVersion();类似的信息getVersion();
ActionScript’s String methods allow the version information to be garnered from both $version and getVersion();
ActionScript的String方法允许从$version和getVersion();获得版本信息getVersion();
Which version detection method you use will depend on your target audience, something that cannot be stressed enough when developing Flash content for the Web.
您使用哪种版本检测方法将取决于您的目标受众,这在为Web开发Flash内容时压力不够大。
Employing this method involves checking for the version number. If the version number is less than that required, take the user to a frame of the movie that displays some descriptive content and then prompts them to upgrade their browser. If the user has the required Flash Player, the movie can then continue loading.
使用此方法涉及检查版本号。 如果版本号小于所需的版本号,则将用户带到显示一些描述性内容的电影的一帧,然后提示他们升级其浏览器。 如果用户具有所需的Flash Player,则影片可以继续加载。
Code example
代码示例
Below is some ActionScript developed to handle the version detection. In my testing it worked well with Flash Player 4 and above. Flash Player 2 and 3 failed the test and displayed a blank movie — probably due to the ActionScript used. Note that some of this code is used with the Server Side detection technique described further on in this article.
以下是一些为处理版本检测而开发的ActionScript。 在我的测试中,它可以与Flash Player 4及更高版本配合使用。 Flash Player 2和3未能通过测试,并显示了空白影片-可能是由于使用了ActionScript。 请注意,本文中进一步描述的某些代码与服务器端检测技术一起使用。
function checkPlayerAgainst(requiredPlayerVersion, thisPlayerId) { //----- first get the user's player information -------// //make an array of the client player's version numbers //thisPlayerId will be "WIN 6,0,21,0" or similar thisVer = thisPlayerId.split(","); //get rid of the gunk before the major player version number //eg "WIN 6" etc - the first entry of the array will old OS information thisVerSpaceNum = thisVer[0].indexOf(" "); //finally, a major version number (eg 6) thisMajorVer = Number(thisVer[0].substr(thisVerSpaceNum)); //---------------------------------------------------------------------// //if the passed variable is not set //or the major version number is equal to the minimum required if(thisPlayerId == false || (thisMajorVer == requiredPlayerVersion)) { gotoAndStop("upgrade"); } //if the major version number found is greater than the required version else if(thisMajorVer > requiredPlayerVersion) { //play the movie gotoAndStop("init"); } //default to upgrade information else { gotoAndStop("upgrade"); } }This function is called by the following code:
以下代码调用此函数:
//Flash Player <4 doesn't like >= //so set minimum to 5 if checking for 6 //set minimum to 4 if checking for 5 and above minimumVersion = 5; //just for display youNeed = minimumVersion+1; //get the installed Player version installedVersion = getVersion(); //less than Flash Player 5 if(installedVersion == "") { //debug = "mime type not found"; gotoAndStop("upgrade"); } //Flash Player 5 or later else { //Flash Player 6.0r65 or later and mime-type found //the mime-type can be found using server side detection if(skipVersionCheck=="true") { gotoAndStop("init"); //debug = "skipped version check as mime-type was found"; } //Flash Player 5 or later and mime-type not found else { //debug = "mime-type not found"; checkPlayerAgainst(minimumVersion, installedVersion); } } stop();When should this method be employed?
什么时候应该采用这种方法?
When you are sure whether users will have Flash Player 4r11 installed as a minimum. Note that this method doesn’t break with Flash 3 and 2 — the movie starts but doesn’t run, probably due to the ActionScript involved. 当您确定用户是否至少要安装Flash Player 4r11时。 请注意,此方法不会在Flash 3和Flash 2中中断-电影会开始但无法运行,这可能是由于涉及到ActionScript。When should this method be avoided?
什么时候应该避免这种方法?
When you may have a significant number of Flash Player 2 and 3 users (unlikely). 当您可能有大量的Flash Player 2和3用户时(不太可能)。 When you want to provide markup based alternate content for users with less than the required Flash Player version. 当您要为少于所需Flash Player版本的用户提供基于标记的替代内容时。This detection method fits neatly with what is probably the most elegant of all Flash Player detection scenarios, server side detection:
此检测方法非常适合所有Flash Player检测方案中最优雅的服务器端检测:
This method uses scripting languages such as PHP, Coldfusion, Perl and the Microsoft stable of server side languages. No client side version detection is required, as this detection method can be handled internally by Flash ActionScript itself.
此方法使用脚本语言,例如PHP,Coldfusion,Perl和Microsoft稳定的服务器端语言。 不需要客户端版本检测,因为此检测方法可以由Flash ActionScript本身在内部进行处理。
Macromedia’s release notes for Flash Player 6 state that the Flash mime-type “application/x-shockwave-flash” is added to the HTTP-ACCEPT header when Flash Player 6 release 65 or later is installed on all available browsers. On the face of it this is great — it takes Flash detection away from an unknown browser and places it in a stable, managed environment.
Macromedia针对Flash Player 6的发行说明指出,当在所有可用的浏览器上安装Flash Player 6发行版65或更高版本时,会将Flash哑剧类型“ application / x-shockwave-flash”添加到HTTP-ACCEPT标头中。 从表面上看,这很棒–将Flash检测从未知的浏览器中移开,并将其放置在稳定的托管环境中。
In practice, though, we find that this method still relies on support from browsers. Mozilla allows the mime-type to be written to its header, Internet Explorer 6 allows the same to happen but does not send the header when the page is refreshed, and no changes are made to Opera 7’s header at all.
不过,实际上,我们发现此方法仍然依赖于浏览器的支持。 Mozilla允许将mime类型写入其标题,Internet Explorer 6允许发生这种情况,但刷新页面时不发送该标题,并且对Opera 7的标题完全不做任何更改。
Don’t worry. As with most things on the Web there is a workaround — in this case relying on the Flash Player footprint and inbuilt version detection.
不用担心 与Web上的大多数事物一样,有一种解决方法-在这种情况下,依赖Flash Player占用空间和内置版本检测功能。
So how does this work?
那么这是如何工作的呢?
The HTTP-ACCEPT header that’s sent to the server includes a listing of all mime-types the browser can handle, such as text/html, image/gif etc. When the latest Flash Player is installed, it attempts to add this entry to the header:
发送到服务器的HTTP-ACCEPT标头包含浏览器可以处理的所有mime类型的列表,例如text / html,image / gif等。安装最新的Flash Player时,它将尝试将此条目添加到标头:
"application/x-shockwave-flash"Using PHP, for instance, we can check whether this string is present in the header:
例如,使用PHP,我们可以检查标头中是否存在此字符串:
<?php //flash detection -- search the HTTP_ACCEPT string for the Flash mime-type. //use $HTTP_ACCEPT for PHP versions <4.1 if(eregi("application/x-shockwave-flash", $_SERVER['HTTP_ACCEPT'])) { $hasFlashSupport=true; } //eregi is the string (case insensitive) comparison function in PHP //it will return a true or false depending on whether the substring is found ?>What an elegant solution to Flash detection! If the variable $hasFlashSupport is set to true, we can assume that Flash Player 6 .0r65* or later is installed. We can also send markup to the browser based on what is found in the HTTP-ACCEPT header, rather than rely on client side scripts rendering alternate content, and so cut down on bandwidth issues associated with bloated client side scripts. (* Flash Player 6.0r65 for Windows and Mac Classic, 6.0r67 for Mac OSX and 6.0r69 for Linux)
多么出色的Flash检测解决方案! 如果变量$hasFlashSupport设置为true,则可以假定安装了Flash Player 6 .0r65 *或更高版本。 我们还可以基于HTTP-ACCEPT标头中的内容将标记发送到浏览器,而不是依靠呈现替代内容的客户端脚本,从而减少了与client肿的客户端脚本相关的带宽问题。 (*适用于Windows和Mac Classic的Flash Player 6.0r65,适用于Mac OSX的6.0r67和适用于Linux的6.0r69)
There is, however, a big problem with this solution. Anyone with a Flash Player that’s lower than the above versions (including earlier releases of Flash Player 6), those using Opera, and users who refresh the page with Internet Explorer will be seen by the server side script to have no Flash Player installed!
但是,这种解决方案存在很大的问题。 服务器端脚本会看到任何使用低于上述版本(包括Flash Player 6的较早版本),使用Opera的用户以及使用Internet Explorer刷新页面的用户,都将在服务器端脚本中看到未安装Flash Player!
We have a few options to get around this sticky issue:
我们有一些解决此棘手问题的方法:
completely ignore this and stick with client side scripting (until the population of Flash Player 6.0r65 and above grows) or 完全忽略此问题并坚持使用客户端脚本(直到Flash Player 6.0r65及更高版本的使用量增加)或Deploy a Flash movie, then use our inbuilt version detection method above to check for a required version. Users of the latest Flash Player can skip version detection completely, thanks to the ‘flashvars’ <param> tag, as you’ll see below. Those with no Flash Player will see our descriptive content, as per our XHTML compliant markup.
部署Flash电影,然后使用上面的内置版本检测方法检查所需版本。 得益于'flashvars' <param>标签,最新Flash Player的用户可以完全跳过版本检测,如下所示。 根据我们的XHTML兼容标记,那些没有Flash Player的用户将看到我们的描述性内容。
Let’s look again at a portion of the previous PHP code:
让我们再次看一下以前PHP代码的一部分:
<? //check for flash! if(eregi("application/x-shockwave-flash", $_SERVER['HTTP_ACCEPT'])) { $hasFlashSupport=true; } <object data="index.swf" type="application/x-shockwave-flash" codebase="http://<?=$_SERVER['HTTP_HOST']?>/sitepoint/flashdetection/testmovie/" width="550" height="400"> <param name="movie" value="http://<?=$_SERVER['HTTP_HOST']?>/sitepoint/flashdetection/testmovie/index.swf" /> <param name="menu" value="false" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ededed" /> <? if($hasFlashSupport) { //tell actionscript to skip the version check (we know version 6.0r65 or greater is installed) //flashvars makes a variable called skipVersionCheck available on the _root timeline. ?> <param name="flashvars" value="&skipVersionCheck=true" /> <? } ?> <p> Alternate descriptive content can go here, plus a link to the Flash Player download page for the user to optionally activate. <br /> This text will be displayed if the user-agent cannot render the Flash file specified in the object tag. </p> </object> ?>That flashvars param tag is very important, as we can use server side detection with inbuilt version detection. If we want to skip the inbuilt version detection completely we can check for the value of _root.skipVersionCheck in ActionScript.
该flashvars param标签非常重要,因为我们可以将服务器端检测与内置版本检测一起使用。 如果要完全跳过内置版本检测,可以在ActionScript中检查_root.skipVersionCheck的值。
When should this method be employed?
什么时候应该采用这种方法?
Where you want to show this detection method to a developer audience. 您想向开发人员受众显示此检测方法的位置。 When you want to deploy a Flash movie for the latest Player — with the next generation of Flash Players (7 and beyond), this method will be of key importance for those wanting to distinguish player versions, e.g. movies for Flash Player 7 and up only. 如果您要为最新的Player部署Flash电影-以及下一代Flash Player(7及更高版本),则此方法对于想要区分播放器版本的用户来说至关重要,例如,仅适用于Flash Player 7和更高版本的电影。 When you aren’t that concerned about your Flash movie possibly breaking for Flash 2, 3 and 4 users. 当您不关心Flash电影时,可能会破坏Flash 2、3和4用户。When you want a quick and easy Flash Player 6 detection implementation that can be used for any number of Flash movies in a site (that $hasFlashSupport variable can be used throughout the script environment or even attached to a session variable).
如果您想要一种快速简便的Flash Player 6检测实现,可以将其用于站点中的任意数量的Flash电影(该$hasFlashSupport变量可以在整个脚本环境中使用,甚至可以附加到会话变量中)。
When should this method be avoided?
什么时候应该避免这种方法?
When you want to deploy Flash content for a general audience. 当您想为一般受众部署Flash内容时。 It can’t be used if you do not have access to server side scripting languages. 如果您无权访问服务器端脚本语言,则不能使用它。 When you may have a large number of Flash Player 2 and 3 users (unlikely). 当您可能有大量的Flash Player 2和3用户时(不太可能)。Server side detection is definitely the way of the future, and it’s up to you to make the decision on whether to employ it now. Hopefully, browsers such as Internet Explorer and Opera will support this far better in the future.
服务器端检测绝对是未来的方式,由您决定是否现在使用它。 希望将来,Internet Explorer和Opera等浏览器将对此提供更好的支持。
After running through these options, you may be wondering what the best detection scenario is for your site. Outlined below are two lists, based on reaching the widest possible audience and ease of implementation.
在运行完这些选项之后,您可能想知道对于您的站点而言最佳的检测方案是什么。 下面列出了两个列表,基于尽可能广泛的受众和易于实施的情况。
Detection methods that will reach the widest possible audience:
检测方法将覆盖尽可能广泛的受众:
Client Side Detection 客户端检测 Inbuilt version detection 内置版本检测 Server side detection 服务器端检测 Manyana method 曼雅娜法 Nested HTML tags 嵌套HTML标签Detection methods that are the easiest to employ:
最容易采用的检测方法:
Server side detection (including Inbuilt version detection) 服务器端检测(包括内置版本检测) Inbuilt version detection 内置版本检测 Manyana method 曼雅娜法 Client side detection 客户端检测 Nested HTML tags 嵌套HTML标签We’ve covered five major Flash Player detection methods here, each with varying degrees of complexity and browser support. In addition to this, we’ve investigated some useful ways of making the detection process both transparent to our end users and degradable for those without the Flash Player.
我们在这里介绍了五种主要的Flash Player检测方法,每种方法具有不同程度的复杂性和浏览器支持。 除此之外,我们还研究了一些有用的方法来使检测过程对我们的最终用户透明,并对没有Flash Player的用户可降解。
In writing the article I was surprised at how important the role standards support played in building more elegant version detection methods than client side scripting.
在写这篇文章时,我惊讶于标准支持在构建比客户端脚本更优雅的版本检测方法中所起的重要作用。
If Internet Explorer for Windows supported the Object tag to w3c recommendation and sent its HTTP-ACCEPT header correctly, we would find detection methods such as tag nesting and server side detection far more enticing to implement, which would lead to lighter markup and smarter Flash support.
如果Windows的Internet Explorer支持“推荐给w3c的对象标签”并正确发送了HTTP-ACCEPT标头,我们将发现诸如标签嵌套和服务器端检测之类的检测方法更具吸引力,这将导致更轻松的标记和更智能的Flash支持。 。
Unfortunately, the monopoly this browser has in the market leaves us with client side scripting as currently the most robust detection method to use across sites for the general public.
不幸的是,该浏览器在市场上的垄断地位使我们无法使用客户端脚本,而将其作为当前最健壮的检测方法,可以跨站点用于普通大众。
To further other, more elegant detection scenarios I would recommend Flash developers investigate server side detection, inbuilt version detection and tag nesting, as discussed in the article.
对于其他更优雅的检测方案,我建议Flash开发人员研究服务器端检测,内置版本检测和标签嵌套,如本文所述。
I would also recommend developers and designers start employing the object tag-based markup used in this article and others, discarding the embed tag. Dealing with one tag only for deploying Flash files does assist in controlling the Player download and brings detection within your control, rather than handing it to whatever browser the visitor uses.
我还建议开发人员和设计人员开始使用本文和其他文章中使用的基于对象标签的标记,而放弃embed标签。 仅处理一个用于部署Flash文件的标签确实有助于控制Player的下载并在您的控件内进行检测,而不是将其交给访问者使用的任何浏览器。
The more Web developers and designers start pushing for better browser support, the faster we will be able to implement smarter, less bloated Flash Player detection scenarios for the majority of users.
越来越多的Web开发人员和设计人员开始寻求更好的浏览器支持,我们将能够更快地为大多数用户实现更智能,更轻松的Flash Player检测方案。
As this article was completed, Macromedia released a beta version of Flash Player 7. At first glance, there are numerous additions in this Player including a new Flash Player Update Mechanism (currently only for Internet Explorer browsers running on Windows). For more information on this beta Player visit (Links to Resources)
Macromedia Flash SWF file format information
Macromedia Flash SWF文件格式信息
Macromedia Flash SWF file format download links.http://www.macromedia.com/software/flash/open/licensing/fileformat/
Macromedia Flash SWF文件格式下载链接。 http://www.macromedia.com/software/flash/open/licensing/fileformat/
Downloads of older Players for testing.http://www.macromedia.com/support/flash/ts/documents/oldplayers.htm
下载较早的Player进行测试。 http://www.macromedia.com/support/flash/ts/documents/oldplayers.htm
How to uninstall Flash Player to test detection methods with no Player present.http://www.macromedia.com/support/flash/ts/documents/remove_player.htm
如何在没有Player的情况下卸载Flash Player以测试检测方法。 http://www.macromedia.com/support/flash/ts/documents/remove_player.htm
Manyana Method
曼雅娜法
Flash Player population censushttp://www.macromedia.com/software/player_census/flashplayer/version_penetration.html
Flash Player人口普查http://www.macromedia.com/software/player_census/flashplayer/version_penetration.html
Client Side Detection
客户端检测
Colin Moock’s FPI (Flash Player Inspector)http://www.moock.org/webdesign/flash/detection/moockfpi/
Colin Moock的FPI(Flash播放器检查器) http://www.moock.org/webdesign/flash/detection/moockfpi/
Navigator.plugins in the Javascript dictionary. http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/nav.html#1193425
Javascript字典中的Navigator.plugins。 http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/nav.html#1193425
CreateObject in VBScript.http://support.microsoft.com:80/support/kb/articles/q183/2/84.asp
VBScript中的CreateObject。 http://support.microsoft.com:80/support/kb/articles/q183/2/84.asp
The Flash Deployment Kit is Macromedia’s contribution to client side detection.http://www.macromedia.com/support/flash/player/flash_deployment_readme/
Flash Deployment Kit是Macromedia对客户端检测的贡献。 http://www.macromedia.com/support/flash/player/flash_deployment_readme/
Cascading XHTML : the object tag
级联XHTML:对象标记
The Object element in the HTML4 W3c recommendation.https://www.w3.org/TR/html4/struct/objects.html
HTML4 W3c建议中的Object元素。 https://www.w3.org/TR/html4/struct/objects.html
Internet Explorer problems with nested object tag support.http://www.xml.com/pub/a/2003/07/02/dive.html
嵌套对象标签支持的Internet Explorer问题。 http://www.xml.com/pub/a/2003/07/02/dive.html
Inbuilt Flash version detection
内置Flash版本检测
$version in ActionScript.http://www.macromedia.com/support/flash/ts/documents/version.htm
ActionScript中的$ version。 http://www.macromedia.com/support/flash/ts/documents/version.htm
getVersion() in the ActionScript dictionary.http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary378.html
ActionScript字典中的getVersion()。 http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary378.html
System.capabilities.version in the ActionScript dictionary.http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary719.html
ActionScript词典中的System.capabilities.version。 http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary719.html
Server Side Flash Detection
服务器端闪存检测
Macromedia Flash Player 6 release notes.http://www.macromedia.com/support/flash/releasenotes/player/rn_6.html#new
Macromedia Flash Player 6发行说明。 http://www.macromedia.com/support/flash/releasenotes/player/rn_6.html#new
A Macromedia Devnet article relying on redirects and Browserhawk.http://www.macromedia.com/devnet/mx/flash/articles/browser_hawk.html
依赖重定向和Browserhawk的Macromedia Devnet文章。 http://www.macromedia.com/devnet/mx/flash/articles/browser_hawk.html
Coldfusion and Server Side Flash detection with HTTP-ACCEPT.http://cfm.blogspot.com/2003_03_01_cfm_archive.html#90765995
使用HTTP-ACCEPT进行Coldfusion和服务器端Flash检测。 http://cfm.blogspot.com/2003_03_01_cfm_archive.html#90765995
Other Resources
其他资源
HTTP-ACCEPT from the W3C.https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
W3C的HTTP-ACCEPT。 https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Web Content Accessibility Guidelines – Use W3c technologies.https://www.w3.org/TR/WCAG10/#gl-use-w3c
Web内容可访问性准则–使用W3c技术。 https://www.w3.org/TR/WCAG10/#gl-use-w3c
The Embed tag – a relic from Netscape 4.http://devedge.netscape.com/library/manuals/1998/htmlguide/tags14.html#1286379
Embed标签是Netscape 4的遗物。http: //devedge.netscape.com/library/manuals/1998/htmlguide/tags14.html#1286379
Flash Satay – standards compliant markup to deploy Flash movies.http://www.alistapart.com/stories/flashsatay/
Flash Satay –符合标准的标记,用于部署Flash电影。 http://www.alistapart.com/stories/flashsatay/
A Netscape Devedge article on Object and Embed.http://devedge.netscape.com/viewsource/2002/markup-and-plugins/
有关对象和嵌入的Netscape Devedge文章。 http://devedge.netscape.com/viewsource/2002/markup-and-plugins/
翻译自: https://www.sitepoint.com/techniques-unearthed/
flash player