アクセシビリティ

アクティブコンテンツのアップデートに関する記事

JavaScriptソリューションの実装前後の例

提案されたInternet Explorerの変更に対する回避策としてWebサイトを更新する前に、ユーザに対する変更の影響を確認することは有益です。Internet Explorerの更新プログラムを適用していないユーザ向けに、アドビが推奨する回避策を実装する前と後のアクティブコンテンツの表示を示すデモを用意しています。メモ:アップデートは、Windows UpdateまたはMicrosoft Supportからダウンロードできます。

更新プログラムを適用されたバージョンのMicrosoft Internet Explorerを使用しているユーザ向けに、これらのページではJavaScriptソリューションを実装する"前"と"後"の例を示します。実装“前”の例に示すページでは、更新プログラムを適用されたバージョンのInternet Explorerでコンテンツと対話する前に、ユーザがコンテンツを有効化しなければなりません。実装後は、予想通りのシームレスなユーザ体験ができます。以下のリンクから、同じファイルの実装"前"と"後"の例を確認できます。

メモ:これらの例は、アップデートされたバージョンのInternet Explorerを使用した場合のFlashコンテンツの動作を示しています。このブラウザを使用していない場合は、この例の実装前と実装後の違いは実感できません。

実装前後の例の動作

実装"前"の例では、従来の<object>および<embed>タグコードを使用してFlashムービーを表示します。新しいInternet Explorerを使用すると、"このコントロールを使用するためにクリックして有効化する"ことを求めるツールヒントが表示されます。このブラウザを使用していない場合でも、アドビのデモで、またはMSDNの記事ActiveX コントロールのアクティブ化の説明で変化を確認できます。

実装"後"の例では、推奨する外部JavaScriptソリューションを使用してFlashムービーを表示します。この修正プログラムの実装方法の詳細については、ブラウザの更新に備えたアクティブコンテンツ使用Webサイトの準備を参照してください。この例では、JavaScriptが有効になっている任意のブラウザで、クリックして有効化することなく、コンテンツと対話ができます。

実装"前"と実装"後"の例のソースコード

両方の例のソースコードを次に示します。これらのページでFlashファイルの例を表示する方法については、コードを確認してください。

実装"前"の例のソースコード

実装"前"の例を実行›

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
  <title>Before: Traditional Object/Embed Tag Combination</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 </head>
 <body>
   <!-- This object and embed tag combination is the most common way to embed Flash movies. -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="369" height="113">
   <param name="movie" value="flash.swf">
   <param name="quality" value="high">
   <embed src="flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="369" height="113"></embed>
  </object> 
 </body>
</html>

実装"後"の例のソースコード

実装"後"の例を実行›

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>After: Using the External Javascript Solution</TITLE>
    <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
	
<!-- These script tags reference the external JavaScript files (.js) which contain functions that dynamically write the object and embed tags.  These files are described and can be downloaded from the article "Preparing Websites With Active Content for Upcoming Browser Changes" at the Active Content Developer Center. -->
		 
<script type="text/javascript" src="after/AC_RunActiveContent.js"></SCRIPT>
	
<meta content="MSHTML 6.00.2800.1226" name=GENERATOR>
</head>
<body>

<!-- This script tag calls the functions defined in the external JavaScript file to dynamically generate the tags that embed the Flash movie in the page. -->> 
<script type="text/javascript">
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','369','height','113','src','flash','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash' ); </script> <!-- Content inside a NOSCRIPT tag will be displayed if the user does not have Javascript enabled or is using a browser that does not support JavaScript --> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="369" height="113"> <param name="movie" value="flash.swf"> <param name="quality" value="high"> <embed src="flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="369" height="113"></embed> </object> <em> <p>Note: You do not have JavaScript enabled.</p><em> </NOSCRIPT> </body> </html>